Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
2
answers
3226
views
Autoconf - setting compiler flags for checks
I am trying to use `autoconf` to create a `configure` script. However, some of the headers I want to check for require additional compiler flags (e.g. `c++11`). I can get partly there with the answer [here](https://unix.stackexchange.com/questions/241286/autoconf-ac-check-headers-for-c11) where the...
I am trying to use
autoconf
to create a configure
script. However, some of the headers I want to check for require additional compiler flags (e.g. c++11
). I can get partly there with the answer [here](https://unix.stackexchange.com/questions/241286/autoconf-ac-check-headers-for-c11) where the relevant lines look like this in the configure.ac
file.
AX_CXX_COMPILE_STDCXX_11(,[mandatory])
AC_CHECK_HEADER("CL/cl2.hpp")
but the std=gnu++11
flag isn't passed to the preprocessing step of AC_CHECK_HEADERS
where I end up with the strange result where it is usable but not present:
checking CL/cl2.hpp usability... yes
checking CL/cl2.hpp presence... no
Looking in the config.log
shows the following lines:
configure:3423: checking CL/cl2.hpp presence
configure:3423: g++ -E conftest.cpp
In file included from conftest.cpp:19:0
/usr/include/CL/cl2.hpp:442:2: error #error Visual studio 2013 or another C++11-supported compiler required
where I can clearly see that the C++ flag is not being used. How can I have compiler flags be used in these preprocessor steps?
**EDIT**
I can manually get around this by setting the CXXCPP
manually when running configure
but I'd like it to run without the end user needing to know this.
./configure CXXCPP="g++ -E -std=gnu++11"
cdeterman
(121 rep)
Nov 6, 2015, 05:50 PM
• Last activity: Aug 7, 2025, 09:07 PM
0
votes
0
answers
29
views
Simplest way to wrap an "AC_DEFINE_UNQUOTED" output around #ifndef and #endif?
This line for example AC_DEFINE_UNQUOTED([SOME_MACRO_NAME], "$SOME_VALUE", [some comment]) generates printf "%s\n" "#define SOME_MACRO_NAME \"$SOME_VALUE\"" >>confdefs.h as a line in `configure`. And something like the following in `config.h` after `configure` is run: /* some comment */ #define SOME...
This line for example
AC_DEFINE_UNQUOTED([SOME_MACRO_NAME], "$SOME_VALUE", [some comment])
generates
printf "%s\n" "#define SOME_MACRO_NAME \"$SOME_VALUE\"" >>confdefs.h
as a line in
configure
.
And something like the following in config.h
after configure
is run:
/* some comment */
#define SOME_MACRO_NAME ""
How would I make it produce the following instead?
/* some comment */
#ifndef SOME_MACRO_NAME
#define SOME_MACRO_NAME ""
#endif
Surely I can add some printf
lines manually or create a custom function but shouldn't there be an idiomatic way to do this already? Either methods I mentioned are hackish either way as I'm asserting confdefs.h
is the file being temporarily produced.
I'm already seeing people would be suggesting testing $SOME_VALUE
maybe through AS_IF
or m4_if
(or any of their applicable variants) instead but that's a varying use case. I might want to have the variable overridable through autoreconf
, through ./configure
or through CFLAGS
with the -D
option. It depends. But right now I just want the answer for this.
Also somebody might suggest using a template. Please, please no.
konsolebox
(1107 rep)
Dec 2, 2024, 04:20 PM
• Last activity: Dec 2, 2024, 04:25 PM
5
votes
1
answers
2736
views
How can I install M4 on Linux, avoiding the dependency loop with Automake and Autoconf?
I am trying to install GNU M4 on my Chromebook using the 1.4.17 tarball, but when I run `./configure` and then`make` I get an error related to `aclocal`, which is apparently part of the GNU Automake package. The exact error I get is WARNING: 'aclocal-1.14' is missing on your system. You should only...
I am trying to install GNU M4 on my Chromebook using the 1.4.17 tarball, but when I run
./configure
and thenmake
I get an error related to aclocal
, which is apparently part of the GNU Automake package. The exact error I get is
WARNING: 'aclocal-1.14' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
make: *** [aclocal.m4] Error 127
I know the first part is only a warning, but the name indicates that the error is related.
I also tried to create an empty file for aclocal.m4
, and I get a different message: a warning about automake-1.14
missing and make: *** [Makefile.in] Error 1
Unfortunately, according to the official page , Automake requires Autoconf, which in turn requires M4 . What can I do to install M4 and avoid this problem?
murgatroid99
(173 rep)
Dec 15, 2013, 04:56 AM
• Last activity: Oct 18, 2023, 11:02 PM
78
votes
6
answers
77449
views
Some M4 macros don't seem to be defined
I am trying reinstall pacman on my Arch Linux distribution. When I run the configure script "configure.ac", I get a bunch of undefined macros: error: possibly undefined macro: AM_INIT_AUTOMAKE. If this token and others are legitimate, please use m4_pattern_allow. See the autoconf documentation. erro...
I am trying reinstall pacman on my Arch Linux distribution. When I run the configure script "configure.ac", I get a bunch of undefined macros:
error: possibly undefined macro: AM_INIT_AUTOMAKE.
If this token and others are legitimate, please use m4_pattern_allow.
See the autoconf documentation.
error: possibly undefined macro: AC_PROG_LIBTOOL
error: possibly undefined macro: AM_GNU_GETTEXT
error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
error: possibly undefined macro: AM_CONDITIONAL
Does anyone know what would cause these macros to be undefined? Having come from Ubuntu (where everything just works, and is therefore boring), I don't really know about automake.
SirTasty
(923 rep)
Aug 13, 2011, 03:35 AM
• Last activity: May 3, 2023, 09:09 PM
1
votes
1
answers
280
views
What does it mean when "aclocal cannot open VERSION"
Is this the correct forum? I am running ./bootstrap for a program called Qucs and it complains about VERSION ```~/Downloads/qucs-0.0.20$ ./bootstrap Running aclocal... Running automake... Running autoconf... bootstrapping /home/lasse/Downloads/qucs-0.0.20/qucs-core bootstrapping the qucs-core source...
Is this the correct forum? I am running ./bootstrap for a program called Qucs and it complains about VERSION
~/Downloads/qucs-0.0.20$ ./bootstrap
Running aclocal...
Running automake...
Running autoconf...
bootstrapping /home/lasse/Downloads/qucs-0.0.20/qucs-core
bootstrapping the qucs-core sources...
Creating aclocal.m4... sh: 1: cannot open VERSION: No such file
sh: 1: cannot open VERSION: No such file
done.
Creating config.h.in... sh: 1: cannot open VERSION: No such file
done.
Libtoolizing... libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
done.
Creating Makefile.in(s)... sh: 1: cannot open VERSION: No such file
done.
Creating configure... done
bootstrapping /home/lasse/Downloads/qucs-0.0.20/qucs
Creating aclocal.m4... sh: 1: cannot open VERSION: No such file
fatal: not a git repository (or any of the parent directories): .git
sh: 1: cannot open VERSION: No such file
fatal: not a git repository (or any of the parent directories): .git
done.
Creating config.h.in... sh: 1: cannot open VERSION: No such file
fatal: not a git repository (or any of the parent directories): .git
done.
Running libtoolize
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: linking file 'm4/libtool.m4'
libtoolize: linking file 'm4/ltoptions.m4'
libtoolize: linking file 'm4/ltsugar.m4'
libtoolize: linking file 'm4/ltversion.m4'
libtoolize: linking file 'm4/lt~obsolete.m4'
Running automake... sh: 1: cannot open VERSION: No such file
fatal: not a git repository (or any of the parent directories): .git
done.
Running autoconf... done.
bootstrapping /home/lasse/Downloads/qucs-0.0.20/qucs-doc
Creating aclocal.m4... sh: 1: cannot open VERSION: No such file
configure.ac:15: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.15/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:15: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
done.
Creating Makefile.in(s)... sh: 1: cannot open VERSION: No such file
configure.ac:15: error: AC_INIT should be called with package and version arguments
aclocal.m4:172: AM_INIT_AUTOMAKE is expanded from...
configure.ac:15: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
automake: error: autoconf failed with exit status: 1
done.
Creating configure... sh: 1: cannot open VERSION: No such file
configure.ac:15: error: AC_INIT should be called with package and version arguments
aclocal.m4:172: AM_INIT_AUTOMAKE is expanded from...
configure.ac:15: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
done.
Lasse Karagiannis
(113 rep)
Aug 30, 2022, 06:52 PM
• Last activity: Aug 30, 2022, 07:38 PM
69
votes
9
answers
60427
views
Why can't gcc find libevent when building tmux from source?
I want to install tmux on a machine where I don't have root access. I already compiled libevent and installed it in `$HOME/.bin-libevent` and now I want to compile tmux, but configure always ends with `configure: error: "libevent not found"`, even though I tried to point to the libevent directory in...
I want to install tmux on a machine where I don't have root access. I already compiled libevent and installed it in
$HOME/.bin-libevent
and now I want to compile tmux, but configure always ends with configure: error: "libevent not found"
, even though I tried to point to the libevent directory in the Makefile.am
by modifying LDFLAGS
and CPPFLAGS
, but nothing seems to work.
How can I tell the system to look in my home dir for the libevent?
volker
(693 rep)
Aug 2, 2011, 04:04 PM
• Last activity: Aug 9, 2022, 05:05 AM
2
votes
2
answers
8635
views
How do I install xorg-macros?
I'm trying to build xf86-input-libinput from source to apply a patch. When I follow the recipe given [here][1] at the step `autoreconf -vif` I get an error saying: ``` configure.ac:41: error: must install xorg-macros 1.8 or later before running autoconf/autogen ``` I've tried `sudo apt-get install x...
I'm trying to build xf86-input-libinput from source to apply a patch. When I follow the recipe given here at the step
autoreconf -vif
I get an error saying:
configure.ac:41: error: must install xorg-macros 1.8 or later before running autoconf/autogen
I've tried sudo apt-get install xorg-macros
to no avail (unable to find source package). How can I install xorg-macros
?
Cornelius Roemer
(356 rep)
Jul 28, 2021, 11:10 AM
• Last activity: Jul 30, 2022, 04:01 PM
1
votes
2
answers
562
views
autoconf tried to invoke "exec -m' under bash, but -m is not a legal operand for exec
This question may really be about where to get help, rather than help for the problem itself. Please forgive the wordiness! I'm trying to build gcc to run on Win32 and produce code for AVR. I've started with the files used by the Arduino people to build their AVR tool chain. Being on a windows machi...
This question may really be about where to get help, rather than help for the problem itself. Please forgive the wordiness!
I'm trying to build gcc to run on Win32 and produce code for AVR. I've started with the files used by the Arduino people to build their AVR tool chain.
Being on a windows machine, and that Atmel uses GCC 4.9.2 to build their current tool chain (which is then copied/patched) by the Arduino people,
I've installed a MinGW system with a GCC at 4.9.2 , downloaded the Arduino people's tool chain source and followed their directions (of course I've accidentally gotten something wrong, or somesuch?).
The
./configure
stage of autoconf (actually G:\GNU-GCC\toolchain-avr\gcc\libgcc\configure
) seems to successfully invoke a gcc several times, using a Win32 program called xgcc.exe that autoconf make placed in my gcc-build/gcc directory. The last successful run has -qversion
for the compiler options.
The next run is the exact same invocation except it uses -o conftest -g -w -O2 -g0 -DWIN32 conftest.c
as compiler options, and this time tries to **fire off the compiler using exec -m
**.
This doesn't work, because the bash exec command doesn't have a -m
option.
Note that xgcc.exe
is a real program (not a script), and is compiled by the autoconf make step. It may be the cross compiler, as it gets copied to gcc-cross.exe
. *Therefore I assume that the autoconf launcher (M4 macro?) is causing the error.*
Here's a part of config.log
: (Look for the lines starting exec: usage: exec [-cl] [-a name] file ...
gcc version 4.9.2 (GCC)
configure:3373: $? = 0
configure:3362: /g/gnu-gcc/toolchain-avr/gcc-build/./gcc/xgcc -B/g/gnu-gcc/toolchain-avr/gcc-build/./gcc/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/bin/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/lib/ -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/include -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/sys-include -V
xgcc.exe: error: unrecognized command line option '-V'
xgcc.exe: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3362: /g/gnu-gcc/toolchain-avr/gcc-build/./gcc/xgcc -B/g/gnu-gcc/toolchain-avr/gcc-build/./gcc/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/bin/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/lib/ -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/include -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/sys-include -qversion
xgcc.exe: error: unrecognized command line option '-qversion'
xgcc.exe: fatal error: no input files
compilation terminated.
configure:3373: $? = 1
configure:3389: /g/gnu-gcc/toolchain-avr/gcc-build/./gcc/xgcc -B/g/gnu-gcc/toolchain-avr/gcc-build/./gcc/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/bin/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/lib/ -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/include -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/sys-include -o conftest -g -w -O2 -g0 -DWIN32 conftest.c
g:/gnu-gcc/toolchain-avr/gcc-build/gcc/as: line 106: exec: -m: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
configure:3392: $? = 1
configure:3580: checking for suffix of object files
configure:3602: /g/gnu-gcc/toolchain-avr/gcc-build/./gcc/xgcc -B/g/gnu-gcc/toolchain-avr/gcc-build/./gcc/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/bin/ -B/g/gnu-gcc/toolchain-avr/objdir/gcc/avr/lib/ -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/include -isystem /g/gnu-gcc/toolchain-avr/objdir/gcc/avr/sys-include -c -g -w -O2 -g0 -DWIN32 conftest.c
g:/gnu-gcc/toolchain-avr/gcc-build/gcc/as: line 106: exec: -m: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
Here's the section of gcc-build/gcc/libgcc/config that I believe produced the log.
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
set X $ac_compile
ac_compiler=$2
for ac_option in --version -v -V -qversion; do
{ { ac_try="$ac_compiler $ac_option >&5"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
(eval "$ac_compiler $ac_option >&5") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
sed '10a\
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
rm -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - conftest.$ac_ext
/* end confdefs.h. */
At this point, I'm not sure where to go for help. The Arduino people have been non-responsive, and I don't know enough about autoconf to look for a problem in an autoconf.ac file, or in the autoconf code which generates ./config for the application, or the MC macros.
A scan for "exec" in the automake tools directory gave a zillion hits, none of which looked like an option was being added to "exec somethings...". But I know NOTHING about M4, and dread learning how to debug .ac files.
Suggestions, please?
HiTechHiTouch
(991 rep)
Sep 19, 2016, 11:32 PM
• Last activity: Mar 22, 2022, 02:04 PM
0
votes
1
answers
1030
views
Why can't autoconf find `libtcmalloc`?
I'm trying to compile a complex numerical simulation software. After running `autoconf` and then `./configure ...` (with some other flags), I see the following in the output: ``` checking for malloc in -ltcmalloc... no configure: WARNING: No tcmalloc support available. ``` After looking in `configur...
I'm trying to compile a complex numerical simulation software. After running
autoconf
and then ./configure ...
(with some other flags), I see the following in the output:
checking for malloc in -ltcmalloc... no
configure: WARNING: No tcmalloc support available.
After looking in configure.in
I found:
%zsh> grep 'tcmalloc' configure.in
AC_CHECK_LIB(tcmalloc,malloc,,AC_MSG_WARN([No tcmalloc support available.]))
I have [gperftools](https://github.com/gperftools/gperftools) installed which should provide tcmalloc I think. I do have a few libraries that are called something like that:
%zsh> ldconfig -p|grep 'tcmalloc'
libtcmalloc_minimal_debug.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_minimal_debug.so.4
libtcmalloc_minimal_debug.so (libc6,x86-64) => /usr/lib/libtcmalloc_minimal_debug.so
libtcmalloc_minimal.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_minimal.so.4
libtcmalloc_minimal.so (libc6,x86-64) => /usr/lib/libtcmalloc_minimal.so
libtcmalloc_debug.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_debug.so.4
libtcmalloc_debug.so (libc6,x86-64) => /usr/lib/libtcmalloc_debug.so
libtcmalloc_and_profiler.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc_and_profiler.so.4
libtcmalloc_and_profiler.so (libc6,x86-64) => /usr/lib/libtcmalloc_and_profiler.so
libtcmalloc.so.4 (libc6,x86-64) => /usr/lib/libtcmalloc.so.4
libtcmalloc.so (libc6,x86-64) => /usr/lib/libtcmalloc.so
I tried adding libtcmalloc
to the list in configure.in
but I just get:
checking for tcmalloc in -llibtcmalloc... ./configure: line 11516: WARNING:: command not found
no
Is there a way to get autoconf's AC_CHECK_LIB
to detect my tcmalloc library?
adigitoleo
(129 rep)
Nov 25, 2021, 10:57 AM
• Last activity: Nov 27, 2021, 01:30 AM
4
votes
2
answers
2294
views
How to put multiple -I, -L and -l flags in ./configure?
I am trying to build using `./configure`. I have 1. Three include directories -I/path1/include -I/path2/include -I/path3/include 2. Two link directories -L/path1/lib -L/path2/lib 3. Two `-l` flag options -ltensorflow -lasan 4. Two compile flags -O3 -g How can I put all these flags effectively as opt...
I am trying to build using
./configure
.
I have
1. Three include directories
-I/path1/include
-I/path2/include
-I/path3/include
2. Two link directories
-L/path1/lib
-L/path2/lib
3. Two -l
flag options
-ltensorflow
-lasan
4. Two compile flags
-O3
-g
How can I put all these flags effectively as options in ./configure
?
Sap BH
(45 rep)
Sep 17, 2021, 02:01 PM
• Last activity: Sep 17, 2021, 02:53 PM
0
votes
1
answers
56
views
AX_CHECK_X86_FEATURES for CXXFLAGS
[The autoconf `AX_CHECK_X86_FEATURES`](https://www.gnu.org/software/autoconf-archive/ax_check_x86_features.html) will test for `-mavx`, `-mavx2`, etc and add it to `CFLAGS`. What is the right way to propagate it to `CXXFLAGS` too? Is it "clean" to always add `CFLAGS` to `CXXFLAGS`? It doesn't seem s...
[The autoconf
AX_CHECK_X86_FEATURES
](https://www.gnu.org/software/autoconf-archive/ax_check_x86_features.html) will test for -mavx
, -mavx2
, etc and add it to CFLAGS
. What is the right way to propagate it to CXXFLAGS
too? Is it "clean" to always add CFLAGS
to CXXFLAGS
? It doesn't seem so... But my C++ code contains some avx2 code, so I need this.
MappaM
(175 rep)
Sep 11, 2021, 12:34 PM
• Last activity: Sep 11, 2021, 12:56 PM
1
votes
0
answers
663
views
Why would one M1 machine need architecture-specific options for building from source and other M1 machines not?
I have tool version managers in the Ruby and react-native worlds that (underneath the layers of abstraction) end up building software like Ruby from source using a fairly mundane: ``` ./configure ./make ./make install ``` ... with various options passed into those commands from the abstractions abov...
I have tool version managers in the Ruby and react-native worlds that (underneath the layers of abstraction) end up building software like Ruby from source using a fairly mundane:
./configure
./make
./make install
... with various options passed into those commands from the abstractions above.
On my M1 MacBook Pro I find I have to carefully pass in command line options to get the build to understand what architecture I am running. For instance:
export CONFIGURE_OPTS="--build aarch64-apple-darwin20"; asdf install ruby 2.6.6
...prevents configure from breaking during asdf install
with an error like, machine not recognised
.
Digging down I can see a config.sub
file in the build directory that was created in 2007. It doesn't know anything about the arm64 architecture.
I am fairly certain that the problem is here because ./configure
succeeds if I substitute a 2021 version config.sub from another project and try again.
I am very surprised to find that colleagues who are installing the same software on M1 machines with the exact same asdf install...
process do not have any such hassles.
This is not asdf
-specific, I have the same problem with dependencies installed by CocoaPods, which is also underneath it all using configure
and make
, and similarly my colleagues do not have any problems.
Something on other people's machines (or mine) is overriding the results of config.sub, or must be giving them a different copy of config.sub. I am mystified.
Update: one significant difference between the "working" machines and mine seems to be the output of uname:
Mine:
Darwin 192.168.1.102 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101 arm64 arm64 MacBookPro17,1 Darwin
others':
Darwin Joes-MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64
In particular uname -p
reports arm
on others' machines and arm64
on mine.
iftheshoefritz
(111 rep)
Jul 21, 2021, 04:30 PM
• Last activity: Jul 22, 2021, 03:04 PM
0
votes
1
answers
47
views
Show libraries found by ./configure before building?
Is it possible to get autoconf based build systems to show the libraries it found and will link against, before building the software? As-is my current workflow is: ``` $ cd tps-source-dir $ ./configure --options-i-know-to-pass $ make $ DESTDIR=~/install make install $ find ~/install -name "*.so*" -...
Is it possible to get autoconf based build systems to show the libraries it found and will link against, before building the software? As-is my current workflow is:
$ cd tps-source-dir
$ ./configure --options-i-know-to-pass
$ make
$ DESTDIR=~/install make install
$ find ~/install -name "*.so*" -exec ldd \{\} \;
Crap it found the wrong version of libfoo, try again.
It would be *really* nice to learn exactly which libraries it was going to use *before* spending hours compiling a large package.
pavon
(255 rep)
Jul 2, 2021, 10:14 PM
• Last activity: Jul 3, 2021, 07:53 AM
1
votes
1
answers
450
views
How can you change ./configure to use a specific binary over /usr/bin?
Running macOS Catalina 10.15.6. My question is more related to compilation with GNU tools, so it may be more suited for a different SE site — I'll be happy to close and ask somewhere else if that's the case. I'm trying to compile software (namely `wine-6.0`) and the compilation requires bison, for w...
Running macOS Catalina 10.15.6.
My question is more related to compilation with GNU tools, so it may be more suited for a different SE site — I'll be happy to close and ask somewhere else if that's the case.
I'm trying to compile software (namely
wine-6.0
) and the compilation requires bison, for which there's already an executable in /usr/bin
. However, bison needs to be version >3.0 to compile the program and the binary in /usr/bin
is version 2.7.6. I compiled bison 3.7.6 and I was gonna just move the new bison 3.7 binary into /usr/bin
but due to the filesystem protection of macOS, I can't just replace /usr/bin/bison
. I'd have to restart my mac in recovery mode to disable the filesystem lock, but I have something open that can't stop running at the moment.
Using ./configure --enable-win64
gives the following error:
checking for bison... bison
checking whether bison is recent enough... no
configure: error: Your bison version is too old. Please install bison version 3.0 or newer.
To fix it, I thought modifying PATH
would work; I moved the bison 3.7.6 binary to /usr/local/bin/bison
and did export PATH=/usr/local/bin:$PATH
before ./configure
but it doesn't work; it still just errors about not having bison >3.0 (the same error as before I tried to mess with bison):
checking for bison... bison
checking whether bison is recent enough... no
configure: error: Your bison version is too old. Please install bison version 3.0 or newer.
The weird thing is, just trying to run bison uses the right binary.
$ bison -V
bison (GNU Bison) 3.7.6
Written by Robert Corbett and Richard Stallman.
...
$ which bison
/usr/local/bin/bison
I also tried messing with the configure.ac
file a little, but the problem is I don't really know what I'm doing there. Editing the config file and rerunning autoconf
and using ./configure
then still doesn't work.
Ultimately, my question is: how do I ensure ./configure
uses the correct bison binary?
Adam Ronald
(31 rep)
May 25, 2021, 03:05 PM
• Last activity: May 25, 2021, 04:16 PM
-1
votes
2
answers
1954
views
How can I fix this automake and autoconf missing issue?
I am trying to install avro-keyboard on Kali Linux but I am getting this error message on folowing this step from the tutorials: ``` root@al-ajal:~# apt-get install git ibus libibus-1.0-dev automake autoconf gjs gir1.2-ibus-1.0 ibus-1.0 Reading package lists... Done Building dependency tree Reading...
I am trying to install avro-keyboard on Kali Linux but I am getting this error message on folowing this step from the tutorials:
root@al-ajal:~# apt-get install git ibus libibus-1.0-dev automake autoconf gjs gir1.2-ibus-1.0 ibus-1.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libibus-1.0-5' for regex 'ibus-1.0'
Note, selecting 'gir1.2-ibus-1.0' for regex 'ibus-1.0'
Package autoconf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package automake is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Unable to locate package ibus
E: Unable to locate package libibus-1.0-dev
E: Couldn't find any package by glob 'libibus-1.0-dev'
E: Couldn't find any package by regex 'libibus-1.0-dev'
E: Package 'automake' has no installation candidate
E: Package 'autoconf' has no installation candidate
What's wrong? I did not find any discussion regarding what to do if autoconf or automake is missing in the tutorials.
Raiyan Ahmad Saadi
(1 rep)
May 7, 2020, 01:04 PM
• Last activity: May 19, 2021, 10:59 AM
1
votes
1
answers
1476
views
Kernel-based IPv6 SLAAC not working?
My ISP's DHCPv6 is broken. As a work around I figured I'd try IPv6 SLAAC since I do see router advertisements coming in on my WAN interface. I believe I've configured `accept_ra`, `accept_ra_pinfo`, and `autoconf` correctly yet I don't see any IPv6 addresses being assigned to the interface. Is there...
My ISP's DHCPv6 is broken. As a work around I figured I'd try IPv6 SLAAC since I do see router advertisements coming in on my WAN interface. I believe I've configured
accept_ra
, accept_ra_pinfo
, and autoconf
correctly yet I don't see any IPv6 addresses being assigned to the interface. Is there some trigger other than the periodic RA or bringing the interface down/up that are required? Are there particular options that need to be present in the RA that my ISP isn't sending?
$ find /proc/sys/net/ipv6/conf/enp8s0/ -mindepth 1 | while read path; do printf "%s: %s\n" "$path" "$(cat $path)" ; done
/proc/sys/net/ipv6/conf/enp8s0/accept_dad: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_ra: 2
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_defrtr: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_from_local: 0
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_min_hop_limit: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_mtu: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_pinfo: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_rt_info_max_plen: 0
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_rt_info_min_plen: 0
/proc/sys/net/ipv6/conf/enp8s0/accept_ra_rtr_pref: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_redirects: 1
/proc/sys/net/ipv6/conf/enp8s0/accept_source_route: 0
/proc/sys/net/ipv6/conf/enp8s0/addr_gen_mode: 1
/proc/sys/net/ipv6/conf/enp8s0/autoconf: 1
/proc/sys/net/ipv6/conf/enp8s0/dad_transmits: 1
/proc/sys/net/ipv6/conf/enp8s0/disable_ipv6: 0
/proc/sys/net/ipv6/conf/enp8s0/disable_policy: 0
/proc/sys/net/ipv6/conf/enp8s0/drop_unicast_in_l2_multicast: 0
/proc/sys/net/ipv6/conf/enp8s0/drop_unsolicited_na: 0
/proc/sys/net/ipv6/conf/enp8s0/enhanced_dad: 1
/proc/sys/net/ipv6/conf/enp8s0/force_mld_version: 0
/proc/sys/net/ipv6/conf/enp8s0/force_tllao: 0
/proc/sys/net/ipv6/conf/enp8s0/forwarding: 0
/proc/sys/net/ipv6/conf/enp8s0/hop_limit: 255
/proc/sys/net/ipv6/conf/enp8s0/ignore_routes_with_linkdown: 0
/proc/sys/net/ipv6/conf/enp8s0/keep_addr_on_down: 0
/proc/sys/net/ipv6/conf/enp8s0/max_addresses: 16
/proc/sys/net/ipv6/conf/enp8s0/max_desync_factor: 600
/proc/sys/net/ipv6/conf/enp8s0/mc_forwarding: 0
/proc/sys/net/ipv6/conf/enp8s0/mldv1_unsolicited_report_interval: 10000
/proc/sys/net/ipv6/conf/enp8s0/mldv2_unsolicited_report_interval: 1000
/proc/sys/net/ipv6/conf/enp8s0/mtu: 1500
/proc/sys/net/ipv6/conf/enp8s0/ndisc_notify: 0
/proc/sys/net/ipv6/conf/enp8s0/ndisc_tclass: 0
/proc/sys/net/ipv6/conf/enp8s0/optimistic_dad: 0
/proc/sys/net/ipv6/conf/enp8s0/proxy_ndp: 0
/proc/sys/net/ipv6/conf/enp8s0/regen_max_retry: 3
/proc/sys/net/ipv6/conf/enp8s0/router_probe_interval: 60
/proc/sys/net/ipv6/conf/enp8s0/router_solicitation_delay: 1
/proc/sys/net/ipv6/conf/enp8s0/router_solicitation_interval: 4
/proc/sys/net/ipv6/conf/enp8s0/router_solicitation_max_interval: 3600
/proc/sys/net/ipv6/conf/enp8s0/router_solicitations: -1
/proc/sys/net/ipv6/conf/enp8s0/seg6_enabled: 0
/proc/sys/net/ipv6/conf/enp8s0/seg6_require_hmac: 0
cat: /proc/sys/net/ipv6/conf/enp8s0/stable_secret: Permission denied
/proc/sys/net/ipv6/conf/enp8s0/stable_secret:
/proc/sys/net/ipv6/conf/enp8s0/suppress_frag_ndisc: 1
/proc/sys/net/ipv6/conf/enp8s0/temp_prefered_lft: 86400
/proc/sys/net/ipv6/conf/enp8s0/temp_valid_lft: 604800
/proc/sys/net/ipv6/conf/enp8s0/use_oif_addrs_only: 0
/proc/sys/net/ipv6/conf/enp8s0/use_optimistic: 0
/proc/sys/net/ipv6/conf/enp8s0/use_tempaddr: 0
Mar 14 20:25:53 router systemd-networkd: enp8s0: Link UP
Mar 14 20:25:53 router kernel: 8021q: adding VLAN 0 to HW filter on device enp8s0
Mar 14 20:25:56 router dhcpcd: enp8s0: carrier acquired
Mar 14 20:25:56 router kernel: igb 0000:08:00.0 enp8s0: igb: enp8s0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Mar 14 20:25:56 router kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp8s0: link becomes ready
Mar 14 20:25:56 router systemd-networkd: enp8s0: Gained carrier
Mar 14 20:25:56 router dhcpcd: enp8s0: IAID 18:0a:25:d3
Mar 14 20:25:57 router dhcpcd: enp8s0: rebinding lease of a.b.c.d
Mar 14 20:25:57 router dhcpcd: enp8s0: probing address of a.b.c.d/22
Mar 14 20:26:01 router dhcpcd: enp8s0: leased of a.b.c.d for 205808 seconds
Mar 14 20:26:01 router dhcpcd: enp8s0: adding route to of a.b.c.d/22
Mar 14 20:26:01 router dhcpcd: enp8s0: adding default route via of a.b.c.e
$ ip addr show enp8s0 | grep -c inet6
0
$ sudo tcpdump -i enp8s0 -vv icmp6
20:46:07.148139 IP6 (class 0xe0, hlim 255, next-header ICMPv6 (58) payload length: 32) _gateway > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 32
hop limit 255, Flags [managed], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 6ms
source link-address option (1), length 8 (1): 00:aa:bb:cc:01:02
0x0000: 00aa bbcc 0102
mtu option (5), length 8 (1): 1500
0x0000: 0000 0000 05dc
(And I didn't redact the addresses in that last command, my ISP really is sending 00:aa:bb:cc:01:02
!)
Huckle
(1087 rep)
Mar 15, 2020, 03:48 AM
• Last activity: Mar 15, 2020, 03:58 AM
42
votes
3
answers
60242
views
What are .in files?
Sometimes in the sources of projects I see "*.in" files. For example, a bunch of "Makefile.in"s. What are they for and/or what does the ".in" part mean? I assume that this has something to do with `autoconf` or `make` or something like those, but I'm not sure. I've tried searching for ".in file exte...
Sometimes in the sources of projects I see "*.in" files. For example, a bunch of "Makefile.in"s. What are they for and/or what does the ".in" part mean? I assume that this has something to do with
autoconf
or make
or something like those, but I'm not sure.
I've tried searching for ".in file extension", "autoconf .in file extension", "autoconf .in", "autoconf dot in", and other variants, with no luck.
strugee
(15371 rep)
Jul 25, 2013, 07:41 AM
• Last activity: Nov 7, 2019, 03:28 AM
0
votes
1
answers
246
views
autoconf: continue after package check failure
In my configure.ac script, I have a basic check for X11: PKG_CHECK_MODULES(X11, x11 > 1.6.4, [AC_DEFINE(HAVE_X11)], []) If this fails, I still want to continue. I thought since I added a blank field in the failure condition, it would continue. However, I still get errors: configure: error: Package r...
In my configure.ac script, I have a basic check for X11:
PKG_CHECK_MODULES(X11, x11 > 1.6.4, [AC_DEFINE(HAVE_X11)], [])
If this fails, I still want to continue. I thought since I added a blank field in the failure condition, it would continue. However, I still get errors:
configure: error: Package requirements (x11 > 1.6.4) were not met:
No package "x11" found
How can I write this line so that it continue if the package is not found?
user8908459
(111 rep)
Sep 16, 2019, 09:40 PM
• Last activity: Sep 16, 2019, 10:09 PM
0
votes
1
answers
98
views
./configure checking whether vs checking if
`./configure` [script](https://en.wikipedia.org/wiki/Configure_script) outputs `checking if` and `checking whether` on execution how the two results are different for checking conditions?
./configure
[script](https://en.wikipedia.org/wiki/Configure_script) outputs checking if
and checking whether
on execution
how the two results are different for checking conditions?
guest
(7 rep)
Apr 27, 2019, 05:40 AM
• Last activity: Apr 27, 2019, 01:54 PM
4
votes
1
answers
770
views
double square bracket in 'case' in 'configure.ac' i[[3456]]86
I am trying to understand the following code snippet. host_cpu='i386' case "$host_cpu" in i[[3456]]86) echo "host_cpu=i386" ;; x86_64) echo "host_cpu=x86_64" ;; *) echo "AC_MSG_ERROR([unsupported CPU type]) " ;; esac I added the variable `host_cpu='i386'` myself to test the code and it switched to t...
I am trying to understand the following code snippet.
host_cpu='i386'
case "$host_cpu" in
i[]86)
echo "host_cpu=i386"
;;
x86_64)
echo "host_cpu=x86_64"
;;
*)
echo "AC_MSG_ERROR([unsupported CPU type]) "
;;
esac
I added the variable
host_cpu='i386'
myself to test the code and it switched to the third case of echo "AC_MSG_ERROR([unsupported CPU type]) "
.
If I change the double bracket in i[]86)
to a single bracket as in i86)
, it switches to the first option yielding i386
. This seems correct to me.
I understand that [
and [[
are the test options. The test condition doesn't seem to apply here as the switch cases are expecting a character to be outputted. So I'm assuming for bash to pick it up as a test condition, it needs to be separated by a space as in [ a < b ]
or [[ a << b ]]
. Because there are no spaces in these case statement, it'll be treated as a regular expression. Is this correct?
So my question is why was the double square bracket was used here by the code writer? It didn't work when I tried to run the code, so what was their intention.
Note: The code was taken from a configure.ac
in the GRUB source code.
Also the $host_cpu and host_cpu=i386 line seem unnecessary, can you explain why the writer would have done this:
AC_CANONICAL_HOST
case "$host_cpu" in
i[]86) host_cpu=i386 ;;
x86_64) host_cpu=x86_64 ;;
*) AC_MSG_ERROR([unsupported CPU type]) ;;
esac
AC_SUBST(host_cpu)
AC_SUBST(host_vendor)
I'm thinking of using AC_SUBST($host_cpu). Why wouldn't you do it this way?
supmethods
(561 rep)
Oct 4, 2018, 01:30 AM
• Last activity: Oct 9, 2018, 01:01 PM
Showing page 1 of 20 total questions