$ touch src/modules/rlm_python/configure.in $ make AUTOCONF src/modules/rlm_python/configure CONFIGURE src/modules/rlm_python/ checking for gcc... gcc ... config.status: creating all.mk CC src/modules/rlm_python/rlm_python.c LINK build/lib/rlm_python.la Very nice. I've been doing massive renaming of module functions, and names in the configure scripts. I missed a few modules the first time around. After some thinking, I created the Make rules which do the work noted above. The result is that it's now much harder to get build failures, even when you're mangling configure scripts! The naming changes were done to avoid the "smurfing smurf" problem. The previous code had a lot of: rlm_smurf_t *smurf; smurf_authenticate() ... etc. With the input for the configure scripts having "smurf_cflags" and "smurf_ldflags". In the interest of removing an abomination from the earth, those functions have been renamed to use a common "mod_" prefix. All modules now have "mod_authenticate", "mod_authorize", etc. The configure / Makefile code has been updated to use mod_cflags, etc. It's just one more item of consistency. It means that there are fewer surprises when editing a module. And few changes to make when creating a new module. Alan DeKok.
On 20.03.2013 03:54, Alan DeKok wrote:
$ touch src/modules/rlm_python/configure.in
$ make AUTOCONF src/modules/rlm_python/configure CONFIGURE src/modules/rlm_python/ checking for gcc... gcc ... config.status: creating all.mk CC src/modules/rlm_python/rlm_python.c LINK build/lib/rlm_python.la
Very nice.
Indeed. Works very well when you do it manually :) Now for an unknown reason, when trying to build the debian packages, I get weird errors once the ./configure is over : /usr/bin/make make[1]: Entering directory `/opt/src/FR3/repositories/freeradius-server' AUTOCONF src/modules/rlm_counter/ /opt/src/FR3/repositories/freeradius-server/missing: 46: /opt/src/FR3/repositories/freeradius-server/missing: autoconf: not found WARNING: `autoconf' is missing on your system. You should only need it if you modified `configure.in'. You might want to install the `Autoconf' and `GNU m4' packages. Grab them from any GNU archive site. CONFIGURE src/modules/rlm_counter/ configure: WARNING: unrecognized options: --with-raddbdir, --with-logdir, --with-experimental-modules, --disable-developer, --with-large-files, --with-udpfromto, --with-edir, --without-rlm_eap_tnc, --with-rlm_sql_postgresql_lib_dir, --with-rlm_sql_postgresql_include_dir, --without-rlm_eap_ikev2, --without-rlm_sql_oracle, --without-rlm_sql_unixodbc checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/opt/src/FR3/repositories/freeradius-server/src/modules/rlm_counter': configure: error: C compiler cannot create executables See `config.log' for more details make[1]: *** [src/modules/rlm_counter/all.mk] Error 77 make[1]: Leaving directory `/opt/src/FR3/repositories/freeradius-server' make: *** [build-arch-stamp] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 If I run `make` manually, it works. When looking at the config.log in rlm_counter [1], I get the following error : cc1: fatal error: /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h: No such file or directory We discussed with Arran and we plan to "re-build" the debian build system from scratch to fit with the change in 3.0. But in the mean-time it would be nice that the old system still works. If we find why it won't build, i'll push a patch to correct most issue with the current debian build system. Thanks for your help Olivier [1] config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure --build x86_64-linux-gnu --prefix=/usr --exec-prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --libdir=/usr/lib/freeradius --datadir=/usr/share --localstatedir=/var --with-raddbdir=/etc/freeradius --with-logdir=/var/log/freeradius --with-experimental-modules=no --disable-developer --with-large-files --with-udpfromto --with-edir --without-rlm_eap_tnc --with-rlm_sql_postgresql_lib_dir=/usr/lib --with-rlm_sql_postgresql_include_dir=/usr/include/postgresql --without-rlm_eap_ikev2 --without-rlm_sql_oracle --without-rlm_sql_unixodbc ## --------- ## ## Platform. ## ## --------- ## hostname = hesraddev01 uname -m = x86_64 uname -r = 3.2.0-38-generic uname -s = Linux uname -v = #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games PATH: /usr/sbin PATH: /usr/sbin ## ----------- ## ## Core tests. ## ## ----------- ## configure:1938: checking for gcc configure:1954: found /usr/bin/gcc configure:1965: result: gcc configure:2194: checking for C compiler version configure:2203: gcc --version >&5 gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 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. configure:2214: $? = 0 configure:2203: gcc -v >&5 Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) configure:2214: $? = 0 configure:2203: gcc -V >&5 gcc: error: unrecognized option '-V' gcc: fatal error: no input files compilation terminated. configure:2214: $? = 4 configure:2203: gcc -qversion >&5 gcc: error: unrecognized option '-qversion' gcc: fatal error: no input files compilation terminated. configure:2214: $? = 4 configure:2234: checking whether the C compiler works configure:2256: gcc -imacros /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h -imacros /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/features.h -I/opt/src/FR3/repositories/freeradius-server -I/opt/src/FR3/repositories/freeradius-server/src -fno-strict-aliasing -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -O2 -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DOPENSSL_NO_KRB5 -fPIC -DIS_MODULE=1 -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro conftest.c >&5 cc1: fatal error: /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h: No such file or directory compilation terminated. configure:2260: $? = 1 configure:2298: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:2303: error: in `/opt/src/FR3/repositories/freeradius-server/src/modules/rlm_counter': configure:2305: error: C compiler cannot create executables See `config.log' for more details ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-imacros /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h -imacros /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/features.h -I/opt/src/FR3/repositories/freeradius-server -I/opt/src/FR3/repositories/freeradius-server/src -fno-strict-aliasing -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -O2 -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DOPENSSL_NO_KRB5 -fPIC -DIS_MODULE=1' ac_cv_env_CPPFLAGS_set=set ac_cv_env_CPPFLAGS_value=-D_FORTIFY_SOURCE=2 ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value='-Wl,-Bsymbolic-functions -Wl,-z,relro' ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_build_alias_set=set ac_cv_env_build_alias_value=x86_64-linux-gnu ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_prog_ac_ct_CC=gcc ## ----------------- ## ## Output variables. ## ## ----------------- ## CC='gcc' CFLAGS='-imacros /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h -imacros /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/features.h -I/opt/src/FR3/repositories/freeradius-server -I/opt/src/FR3/repositories/freeradius-server/src -fno-strict-aliasing -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -O2 -Wall -D_GNU_SOURCE -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DOPENSSL_NO_KRB5 -fPIC -DIS_MODULE=1' CPP='' CPPFLAGS='-D_FORTIFY_SOURCE=2' DEFS='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' EXEEXT='' GREP='' LDFLAGS='-Wl,-Bsymbolic-functions -Wl,-z,relro' LIBOBJS='' LIBS='' LTLIBOBJS='' OBJEXT='' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_URL='' PACKAGE_VERSION='' PATH_SEPARATOR=':' SHELL='/bin/bash' ac_ct_CC='gcc' bindir='${exec_prefix}/bin' build_alias='x86_64-linux-gnu' datadir='/usr/share' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE}' dvidir='${docdir}' exec_prefix='/usr' host_alias='' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' libdir='/usr/lib/freeradius' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='/var' mandir='/usr/share/man' mod_cflags='' mod_ldflags='' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='/usr' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='/etc' target_alias='' targetname='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define PACKAGE_STRING "" #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" configure: exit 77 -- Olivier Beytrison Network & Security Engineer, HES-SO Fribourg Mail: olivier@heliosnet.org
Olivier Beytrison wrote:
Indeed. Works very well when you do it manually :)
Now for an unknown reason, when trying to build the debian packages, I get weird errors once the ./configure is over :
Yeah... I saw that on the travis build system. I'll try to reproduce it here.
/usr/bin/make make[1]: Entering directory `/opt/src/FR3/repositories/freeradius-server' AUTOCONF src/modules/rlm_counter/ /opt/src/FR3/repositories/freeradius-server/missing: 46: /opt/src/FR3/repositories/freeradius-server/missing: autoconf: not found WARNING: `autoconf' is missing on your system. You should only need it if you modified `configure.in'. You might want to install the `Autoconf' and `GNU m4' packages. Grab them from any GNU archive site.
I hate the GNU tools. You don't run autoconf. You run a magic "missing" script. Which succeeds if autoconf doesn't exist. So you can't make the build rule dependent on having autoconf, and you can't fail the build if autoconf fails. <arg>
When looking at the config.log in rlm_counter [1], I get the following error :
cc1: fatal error: /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h: No such file or directory
Ah... that can be fixed. It's just a dependency.
We discussed with Arran and we plan to "re-build" the debian build system from scratch to fit with the change in 3.0. But in the mean-time it would be nice that the old system still works.
I'll go poke it.
If we find why it won't build, i'll push a patch to correct most issue with the current debian build system.
Thanks for your help
Olivier
[1] config.log
Yeah.. it's an order thing. The build has progressed far enough so that the "Make.inc" file exists, which has an IMACRO flag. But it's not far enough for the src/freeradius-devel file to be created. I'll go create a dependency for that, which should fix the problem. I'll also see if I can have the "configure" dependencies check for autoconf existing. Alan DeKok.
Olivier Beytrison wrote:
Now for an unknown reason, when trying to build the debian packages, I get weird errors once the ./configure is over :
I've pushed some fixes. It now works better... but I still get weird errors when running "make deb". It does the "configure" stage correctly, but then errors out with no useful information. Alan DeKok.
On 20.03.2013 14:46, Alan DeKok wrote:
Olivier Beytrison wrote:
Now for an unknown reason, when trying to build the debian packages, I get weird errors once the ./configure is over :
I've pushed some fixes. It now works better... but I still get weird errors when running "make deb". It does the "configure" stage correctly, but then errors out with no useful information.
Alan DeKok. Ok I'll pull and test on my side. Thanks!
Olivier -- Olivier Beytrison Network & Security Engineer, HES-SO Fribourg Mail: olivier@heliosnet.org
On 20.03.2013 14:46, Alan DeKok wrote:
Olivier Beytrison wrote:
Now for an unknown reason, when trying to build the debian packages, I get weird errors once the ./configure is over :
I've pushed some fixes. It now works better... but I still get weird errors when running "make deb". It does the "configure" stage correctly, but then errors out with no useful information.
More weirdness. Fresh git clone, updated debian build system (see http://tinyurl.com/cfb6r9n ) /usr/bin/make make[1]: Entering directory `/opt/src/FR3/repositories/freeradius-server' scripts/boiler.mk:552: src/modules/rlm_example/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_opendirectory/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_redis/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_rediswho/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_rest/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_ruby/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_securid/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_smsotp/all.mk: No such file or directory scripts/boiler.mk:552: src/modules/rlm_sqlhpwippool/all.mk: No such file or directory CONFIGURE src/modules/rlm_sqlhpwippool/ configure: WARNING: unrecognized options: --with-raddbdir, --with-logdir, --with-experimental-modules, --disable-developer, --with-large-files, --with-udpfromto, --without-rlm_eap_tnc, --with-rlm_sql_postgresql_lib_dir, --with-rlm_sql_postgresql_include_dir, --without-rlm_eap_ikev2, --without-rlm_sql_oracle, --without-rlm_sql_unixodbc checking for gcc... gcc checking whether the C compiler works... no configure: error: in `/opt/src/FR3/repositories/freeradius-server/src/modules/rlm_sqlhpwippool': configure: error: C compiler cannot create executables See `config.log' for more details make[1]: *** [src/modules/rlm_sqlhpwippool/all.mk] Error 77 make[1]: Leaving directory `/opt/src/FR3/repositories/freeradius-server' make: *** [build-arch-stamp] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 rlm_sqlhwipool/config.log give the same message as before cc1: fatal error: /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h: No such file or directory Olivier -- Olivier Beytrison Network & Security Engineer, HES-SO Fribourg Mail: olivier@heliosnet.org
Olivier Beytrison wrote:
More weirdness. Fresh git clone, updated debian build system (see http://tinyurl.com/cfb6r9n )
/usr/bin/make make[1]: Entering directory `/opt/src/FR3/repositories/freeradius-server' scripts/boiler.mk:552: src/modules/rlm_example/all.mk: No such file or directory
That's OK. It means that it has to build run "configure" before loading the makefile.
checking whether the C compiler works... no configure: error: in `/opt/src/FR3/repositories/freeradius-server/src/modules/rlm_sqlhpwippool': configure: error: C compiler cannot create executables See `config.log' for more details
That's... weird.
rlm_sqlhwipool/config.log give the same message as before cc1: fatal error: /opt/src/FR3/repositories/freeradius-server/src/freeradius-devel/autoconf.h: No such file or directory
The solution is to *not* use IMACROS when running "configure". Or, to ensure that the src/freeradius-devel directory is linked. That linkage is probably easier than fighting with environment variables... Alan DeKok.
participants (2)
-
Alan DeKok -
Olivier Beytrison