Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build #4

Open
sweisman opened this issue Jun 3, 2021 · 2 comments
Open

How to build #4

sweisman opened this issue Jun 3, 2021 · 2 comments

Comments

@sweisman
Copy link

sweisman commented Jun 3, 2021

I hate to ask this question. How do you build these projects? I tried, in the pxlib-and-pxview repo directory:

autoreconf

Which results in a number of errors.

[sweisman@zaphod pxlib-and-pxview]$ autoreconf
aclocal: warning: couldn't open directory 'm4': No such file or directory
configure.ac:16: warning: 'AM_CONFIG_HEADER': this macro is obsolete.
configure.ac:16: You should use the 'AC_CONFIG_HEADERS' macro instead.
./lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:12072: AM_CONFIG_HEADER is expanded from...
configure.ac:16: the top level
configure.ac:54: warning: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
configure.ac:57: warning: ac_ext=c
configure.ac:57: ac_cpp='$CPP $CPPFLAGS'
configure.ac:57: ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
configure.ac:57: ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
configure.ac:57: ac_compiler_gnu=$ac_cv_c_compiler_gnu
configure.ac:57: 
configure.ac:57: Some influential environment variables:
configure.ac:57: 
configure.ac:57: Use these variables to override the choices made by `configure' or to help
configure.ac:57: it to find libraries and programs with nonstandard names/locations.
configure.ac:57:   CC          C compiler command
configure.ac:57:   CFLAGS      C compiler flags
configure.ac:57:   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
configure.ac:57:               nonstandard directory <lib dir>
configure.ac:57:   LIBS        libraries to pass to the linker, e.g. -l<library>
configure.ac:57:   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
configure.ac:57:               you have headers in a nonstandard directory <include dir>
configure.ac:57: if test -n "$ac_tool_prefix"; then
configure.ac:57:   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
configure.ac:57: set dummy ${ac_tool_prefix}gcc; ac_word=$2
configure.ac:57: { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
configure.ac:57: printf %s "checking for $ac_word... " >&6; }
configure.ac:57: if test ${ac_cv_prog_CC+y}
configure.ac:57: then :
configure.ac:57:   printf %s "(cached) " >&6
configure.ac:57: else $as_nop
configure.ac:57:   if test -n "$CC"; then
configure.ac:57:   ac_cv_prog_CC="$CC" # Let the user override the test.
configure.ac:57: else
configure.ac:57: as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
configure.ac:57: for as_dir in $PATH
configure.ac:57: do
configure.ac:57:   IFS=$as_save_IFS
configure.ac:57:   case $as_dir in #(((
configure.ac:57:     '' is m4_require'd but not m4_defun'd
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/programs.m4:41: _AC_CHECK_PROG is expanded from...
./lib/autoconf/programs.m4:101: AC_CHECK_PROG is expanded from...
./lib/autoconf/programs.m4:221: AC_CHECK_TOOL is expanded from...
./lib/autoconf/c.m4:452: AC_PROG_CC is expanded from...
configure.ac:57: the top level
configure.ac:57: error: required file './compile' not found
configure.ac:57:   'automake --add-missing' can install 'compile'
configure.ac:59: error: required file './config.guess' not found
configure.ac:59:   'automake --add-missing' can install 'config.guess'
configure.ac:59: error: required file './config.sub' not found
configure.ac:59:   'automake --add-missing' can install 'config.sub'
configure.ac:9: error: required file './install-sh' not found
configure.ac:9:   'automake --add-missing' can install 'install-sh'
configure.ac:59: error: required file './ltmain.sh' not found
configure.ac:9: error: required file './missing' not found
configure.ac:9:   'automake --add-missing' can install 'missing'
pxlib/src/Makefile.am: error: required file './depcomp' not found
pxlib/src/Makefile.am:   'automake --add-missing' can install 'depcomp'
autoreconf: error: automake failed with exit status: 1

@jsquyres
Copy link
Owner

jsquyres commented Jun 3, 2021

Try using the autogen.sh script. I'm building on MacOS; here's an autogen.sh on a fresh git clone:

$ automake --version
automake (GNU automake) 1.16.3
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <[email protected]>
       and Alexandre Duret-Lutz <[email protected]>.

$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.

$ glibtool --version
glibtool (GNU libtool) 2.4.6
Written by Gordon Matzigkeit, 1996

Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ ./autogen.sh 
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:54: installing './compile'
configure.ac:9: installing './missing'
pxlib/src/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'

$ make -j8
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in pxlib
Making all in include
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[4]: Nothing to be done for `all-am'.
Making all in src
  CC       libpx_la-paradox.lo
  CC       libpx_la-px_head.lo
  CC       libpx_la-px_misc.lo
  CC       libpx_la-px_io.lo
  CC       libpx_la-px_memory.lo
  CC       libpx_la-px_memprof.lo
  CC       libpx_la-px_error.lo
  CC       libpx_la-px_encode.lo
  CC       libpx_la-px_crypt.lo
  CC       libpx_la-gregor.lo
  CCLD     libpx.la
Making all in doc
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in pxview
Making all in src
  CC       pxview-main.o
  CCLD     pxview
Making all in doc
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
make[2]: Nothing to be done for `all-am'.

I think the key difference is that autogen.sh will make the m4 directory for you if it does not already exist.

@jsquyres
Copy link
Owner

Did the above answer your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants