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

Bug in configure.ac causing CFLAGS being executed as command #471

Closed
sheepduke opened this issue Mar 21, 2021 · 3 comments
Closed

Bug in configure.ac causing CFLAGS being executed as command #471

sheepduke opened this issue Mar 21, 2021 · 3 comments

Comments

@sheepduke
Copy link

Please note that this is a compilation related error.

Environment

$ uname -a
Linux home 5.6.3-gentoo-x86_64 #1 SMP Sun Apr 19 22:20:28 CST 2020 x86_64 AMD Ryzen 7 2700X Eight-Core Processor AuthenticAMD GNU/Linux

How to reproduce the issue

$ CFLAGS="-O2" ./configure

Expected behavior

Flags set properly.

Actual result

~/workspace/roswell  master $ CFLAGS="-O2" ./configure
./configure: line 2194: -O2: command not found
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for main in -lwininet... no
checking for curl_global_init in -lcurl... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking gnu/libc-version.h usability... yes
checking gnu/libc-version.h presence... yes
checking for gnu/libc-version.h... yes
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for windres... no
checking for struct dirent.d_type... yes
checking for git... yes
checking for uname... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating documents/Makefile
config.status: creating config.h
config.status: executing depfiles commands

Please mind the first line ./configure: line 2194: -O2: command not found.

This happens because in the file configure.ac, line 6~7:

${CFLAGS=""}
${CXXFLAGS=""}

In this case, the flags will be invoked as commands, which should not happen. :-)

@sheepduke
Copy link
Author

sheepduke commented Mar 21, 2021

I guess maybe it should be as following for corresponding lines:

CFLAGS=${CFLAGS=""}
CXXFLAGS=${CXXFLAGS=""}

@snmsts
Copy link
Member

snmsts commented Mar 24, 2021

hmm ok.

@snmsts snmsts closed this as completed in 59b610b Mar 24, 2021
@snmsts
Copy link
Member

snmsts commented Mar 24, 2021

Thank you!

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