./configure results in bootstrapping make fragment error only on github - c++

I have a docker container build from debian:latest. The Dockerfile configures and makes the project the project. This build works on local and builds a container. However on github it gives me the following error:
[1/2] STEP 16/17: RUN ./configure GIT_BRANCH=$BRANCH GIT_VERSION=$VERSION
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for g++... g++
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 g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
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 dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 3145728
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether g++ supports C++14 features with -std=c++14... yes
checking for boostlib >= 1.42.0... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for sphirewall-libs... configure: We could not detect the sphirewall libraries.
checking for ldap_simple_bind_s in -lldap... yes
checking for pthread_create in -lpthread... yes
checking for curl_global_init in -lcurl... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for netdb.h... yes
checking for resolv.h... yes
checking whether to enable assertions... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libprocps... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating Makefile
config.status: creating src/autoconf.h
config.status: executing depfiles commands
config.status: error: in `/sphirewall-code/sphirewall-core':
config.status: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE="gmake" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
[2/2] STEP 1/10: FROM debian:latest
error building at STEP "RUN ./configure GIT_BRANCH=$BRANCH GIT_VERSION=$VERSION": error while running runtime: exit status 1
time="2023-01-12T15:41:50Z" level=error msg="exit status 1"
Error: Error: buildah exited with code 1
I expect my github action to build a container out of this. I have attached my docker file too. I also wish I could see the config.log that github generates. Is there a way to do that?
Docker file:
#Taking base as bookworm version and naming it builder
FROM debian:latest as builder
ENV DEBIAN_FRONTEND=noninteractive
#Libraries needed
RUN apt-get update
RUN apt-get -y install build-essential apt-utils\
libprocps-dev\
iproute2\
g++\
libcurl4-openssl-dev\
libdumbnet-dev\
libjemalloc-dev\
libpam0g-dev\
libldap2-dev\
libpcap-dev\
libevent-dev\
libnfnetlink-dev\
libmnl-dev\
ldap-utils\
libnetfilter-queue-dev\
uuid-dev\
libtool\
libncurses5\
libncurses5-dev\
libboost-dev\
libgtest-dev\
libboost-regex-dev\
openssl\
libssl-dev\
automake\
libboost-thread-dev\
libboost-system-dev\
libsqlite3-dev\
libboost-serialization-dev\
libboost-random-dev\
libboost-iostreams-dev\
procps\
libnetfilter-conntrack-dev\
libpstreams-dev\
kmod\
vim\
iptables\
pkg-config
COPY fz-pkgrepo_1.0_amd64.deb /tmp
RUN dpkg -i /tmp/fz-pkgrepo_1.0_amd64.deb
RUN apt-get update
COPY sphirewall.conf /etc/sphirewall.conf
RUN mkdir sphirewall-code
COPY ../sphirewall-code sphirewall-code/
WORKDIR /sphirewall-code/sphirewall-core
#Make the sphirewalld service inside
RUN ls
RUN autoreconf -ivf
RUN ./configure
RUN make

Related

QuantLib Installation using Homebrew on Mac with M1 chip

I'm quite new to Mac system and trying to use Homebrew to install QuantLib for a c++ coursework on XCode. I have installed boost and followed the steps on the website, but met a problem at the step of entering this into the terminal:
./configure --with-boost-include=/usr/local/include/ \
--with-boost-lib=/usr/local/lib/ --prefix=/usr/local/ \
CXXFLAGS='-O2 -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.9' \
LDFLAGS='-stdlib=libc++ -mmacosx-version-min=10.9'
Since it is m1 chip, the default path of Homebrew has changed to /opt/homebrew/ and so has the location of boost, so I've changed it to
./configure --with-boost-include=/opt/homebrew/include/ \
--with-boost-lib=/opt/homebrew/lib/ --prefix=/opt/homebrew/ \
CXXFLAGS='-O2 -std=c++11 -stdlib=libc++ -mmacosx-version-min=11.4' \
LDFLAGS='-stdlib=libc++ -mmacosx-version-min=11.4'
But it still doesn't work and shows:
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: opt/homebrew/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gawk... (cached) awk
checking for opt/homebrew/-gcc... no
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 the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... 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 opt/homebrew/-g++... no
checking for opt/homebrew/-c++... no
checking for opt/homebrew/-gpp... no
checking for opt/homebrew/-aCC... no
checking for opt/homebrew/-CC... no
checking for opt/homebrew/-cxx... no
checking for opt/homebrew/-cc++... no
checking for opt/homebrew/-cl.exe... no
checking for opt/homebrew/-FCC... no
checking for opt/homebrew/-KCC... no
checking for opt/homebrew/-RCC... no
checking for opt/homebrew/-xlC_r... no
checking for opt/homebrew/-xlC... no
checking for opt/homebrew/-clang++... no
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking build system type... Invalid configuration `opt/homebrew/': machine `opt/homebrew/-unknown' not recognized
configure: error: /bin/sh ./config/config.sub opt/homebrew/ failed
How should I change the prefix? Any suggestion would be very welcome!

How to install mingw on linux and configure it to compile C++ code targeting windows?

I would like to install mingw to to use it's cross compiler to compile C++ code in Linux (Centos 7) and get an exe to run on Windows (64 bits).
However I have no access to sudo and I cannot install anything using the package manager, so I'll have to install it manually in a certain directory. I downloaded the .zip from https://sourceforge.net/projects/mingw-w64/, extracted it and in it's folder I tried using the configure script to set it up. by doing the following in the folder it was extracted in.
configure --prefix=/home/myUsername/mingw --enable-lib32 --enable-lib64 --enable-experimental --host=x86_64-w64-mingw32
Which gives me the following output & errors:
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... no
checking for strip... strip
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 build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-w64-mingw32
checking whether to build the headers... yes
checking whether to build the crt... yes
checking whether to build the optional libraries... no
checking whether to build the optional tools... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-headers (/home/myUsername/mingw/mingw-w64-v8.0.0/mingw-w64-headers)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/home/myUsername/mingw' '--enable-lib32' '--enable-lib64' '--enable-experimental' '--host=x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... no
checking for strip... strip
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... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for a sed that does not truncate output... /bin/sed
checking whether to rebuild headers with widl... no
checking whether to build a w32api package for Cygwin... no
checking for c-runtime headers... yes
checking for optional sdk headers... ddk
checking if installing idl files is enabled... no
checking default _WIN32_WINNT version... 0x502
checking default msvcrt... msvcrt (0x700)
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating crt/_mingw.h
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-crt (/home/myUsername/mingw/mingw-w64-v8.0.0/mingw-w64-crt)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/home/myUsername/mingw' '--enable-lib32' '--enable-lib64' '--enable-experimental' '--host=x86_64-w64-mingw32' 'host_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... no
checking for strip... strip
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... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for sysroot... /home/myUsername/mingw
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for x86_64-w64-mingw32-gcc... no
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 x86_64-w64-mingw32-g++... no
checking for x86_64-w64-mingw32-c++... no
checking for x86_64-w64-mingw32-gpp... no
checking for x86_64-w64-mingw32-aCC... no
checking for x86_64-w64-mingw32-CC... no
checking for x86_64-w64-mingw32-cxx... no
checking for x86_64-w64-mingw32-cc++... no
checking for x86_64-w64-mingw32-cl.exe... no
checking for x86_64-w64-mingw32-FCC... no
checking for x86_64-w64-mingw32-KCC... no
checking for x86_64-w64-mingw32-RCC... no
checking for x86_64-w64-mingw32-xlC_r... no
checking for x86_64-w64-mingw32-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for x86_64-w64-mingw32-ranlib... no
checking for ranlib... ranlib
checking for x86_64-w64-mingw32-dlltool... no
checking for dlltool... no
checking for x86_64-w64-mingw32-ar... no
checking for x86_64-w64-mingw32-lib... no
checking for x86_64-w64-mingw32-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of gcc... gcc3
checking for x86_64-w64-mingw32-as... no
checking for as... as
checking whether to build a w32api package for Cygwin... no
checking whether to build the Win32 libraries... yes
checking whether to build the Win64 libraries... yes
checking whether to build the WinARM32 libraries... no
checking whether to build the WinARM64 libraries... no
checking whether to use genlib... no
checking whether to enable globbing... no
checking whether to enable private exports... no
checking whether to enable delay import libs... no
checking what to provide as libmsvcrt.a... msvcrt-os
checking whether to enable experimental features... yes
checking whether the compiler supports -municode... no
checking whether the linker provides _CTOR_LIST_... no
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 _mingw_mac.h usability... no
checking _mingw_mac.h presence... no
checking for _mingw_mac.h... no
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ./configure failed for mingw-w64-crt
Every guide or answers I have seen starts by using the package manager apt-get to install the compiler, so I'm kind of lost on where to look or what to try.
Thank you in advance.

Compiling SQLCipher for Windows

I used cygwin to compile SQLCipher. Package Devel is installed, also OpenSSL is installed.
Dynamic linking:
./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL" LDFLAGS="-lcrypto"
Output:
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
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 for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-unknown-cygwin file names to x86_64-unknown-cygwin format... func_convert_file_noop
checking how to convert x86_64-unknown-cygwin file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... gawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for fdatasync... yes
checking for gmtime_r... yes
checking for isnan... yes
checking for localtime_r... yes
checking for localtime_s... no
checking for malloc_usable_size... yes
checking for strchrnul... yes
checking for usleep... yes
checking for utime... yes
checking for tclsh8.6... no
checking for tclsh8.5... tclsh8.5
configure: Version set to 3.11
configure: Release set to 3.11.0
configure: Version number set to 3011000
checking whether to support threadsafe operation... yes
checking for library containing pthread_create... none required
checking for library containing pthread_mutexattr_init... none required
checking for crypto library to use... openssl
checking for HMAC_Init_ex in -lcrypto... yes
checking whether to allow connections to be shared across threads... no
checking whether to support shared library linked as release mode or not... no
checking whether to use an in-ram database for temporary tables... no
checking if executables have the .exe suffix... unknown
checking for library containing readline... -ledit
checking for library containing fdatasync... none required
checking for library containing dlopen... none required
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlcipher.pc
config.status: creating config.h
config.status: executing libtool commands
But after make there are many errors. Tried to use g++ instead of gcc:
./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_WIN=1 -I. -I/cygdrive/e/git/sqlcipher/src -I/cygdrive/e/git/sqlcipher/ext/rtree -I/cygdrive/e/git/sqlcipher/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_WIN=1 -I. -I/cygdrive/e/git/sqlcipher/src -I/cygdrive/e/git/sqlcipher/ext/rtree -I/cygdrive/e/git/sqlcipher/ext/fts3 -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c -DDLL_EXPORT -DPIC -o .libs/sqlite3.o
sqlite3.c:25240:3: error: unknown type name «CRITICAL_SECTION»
CRITICAL_SECTION mutex; /* Mutex controlling the lock */
sqlite3.c:39059:3: error: unknown type name «HANDLE»
HANDLE h; /* Handle for accessing the file */
sqlite3.c:39063:3: error: unknown type name «DWORD»
DWORD lastErrno; /* The Windows errno from the last I/O error */
...
What could be the reason?

mgiza compile error

I am trying to install the latest version mgiza++ (0.7.1) on my Ubuntu machine, but I'm getting the following erros. I have installed Boost via running this command: sudo apt-get install libboost-all-dev
after running ./configure
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking for library containing strerror... none required
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
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 ranlib... ranlib
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/mkcls/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
after running make
...
/usr/include/c++/4.7/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
In file included from StatVar.h:33:0,
from Problem.h:34,
from KategProblem.h:34,
from KategProblemTest.h:30,
from KategProblemTest.cpp:27:
myleda.h: In instantiation of ‘B& leda_h_array<A, B>::operator[](const A&) [with A = std::basic_string<char>; B = int]’:
KategProblemTest.cpp:96:18: required from here
myleda.h:221:5: error: ‘insert’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
myleda.h:221:5: note: declarations in dependent base ‘__gnu_cxx::hash_map<std::basic_string<char>, int, my_hash<std::basic_string<char>, std::less<std::basic_string<char> > >, std::equal_to<std::basic_string<char> >, std::allocator<int> >’ are not found by unqualified lookup
myleda.h:221:5: note: use ‘this->insert’ instead
myleda.h: In instantiation of ‘B& leda_h_array<A, B>::operator[](const A&) [with A = std::pair<std::basic_string<char>, std::basic_string<char> >; B = int]’:
KategProblemTest.cpp:265:38: required from here
myleda.h:221:5: error: ‘insert’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
myleda.h:221:5: note: declarations in dependent base ‘__gnu_cxx::hash_map<std::pair<std::basic_string<char>, std::basic_string<char> >, int, my_hash<std::pair<std::basic_string<char>, std::basic_string<char> >, std::less<std::pair<std::basic_string<char>, std::basic_string<char> > > >, std::equal_to<std::pair<std::basic_string<char>, std::basic_string<char> > >, std::allocator<int> >’ are not found by unqualified lookup
myleda.h:221:5: note: use ‘this->insert’ instead
make[3]: *** [mkcls-KategProblemTest.o] Error 1
make[3]: Leaving directory `/home/peter/Dropbox/senior_thesis/mgizapp/src/mkcls'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/peter/Dropbox/senior_thesis/mgizapp/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/peter/Dropbox/senior_thesis/mgizapp'
make: *** [all] Error 2
I suspect I'm not linking the Boost library correctly in the Make file. Please let me know if you have any idea.
I solved the problem by editing line 220 of src/mkcls/myleada.h
Originally:
insert(typename MY_HASH_BASE::value_type(a,init));
I changed it to:
this->insert(typename MY_HASH_BASE::value_type(a,init));

How to use "make" to use 64 bit libs because of ELFCLASS64 error

How can I use configure and make tools to specify to use 64 bit libraries? I thought it was automatic, but I get wrong ELF Class.
I'm trying to compile Xdebug for Ubuntu 64 for use with LAMPP (XAMPP for Linux).
./lampp start
Failed loading /opt/lampp/lib/php/extensions/xdebug.so: /opt/lampp/lib/php/extensions/xdebug.so: wrong ELF class: ELFCLASS64
The ./configure looks OK to me, and the make works without errors, I've copied the configure in case its relevant:
/xdebug-2.0.3$ ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib
checking for PHP extension directory... /usr/lib/php5/20060613
checking for PHP installed headers prefix... /usr/include/php5
checking for re2c... no
configure: WARNING: You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable eXtended debugging support... yes, shared
checking for gettimeofday... yes
checking for cos in -lm... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands
I'm not sure of the error, but why are you compiling xdebug? Its available in the repositories of Ubuntu as php5-xdebug (sudo apt-get install php5-xdebug). Though you don't mention your distribution, perhaps its under a similar name?
But to answer your question, the error message looks like xdebug is 64 bit, but that's a problem (is something lampp executes a 32 bit binary?)
Won't:
LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH ./lampp start
work? I don't use Ubuntu, so your path might vary. One thing to do is
ldd ./lampp
to see what the default executable points to.
xdebug was getting compiled in 32 bit. Compile it using:
CXXFLAGS="-m64" CFLAGS="-m64" LDFLAGS="-m64" ./configure --enable-xdebug
worked for me on SPARC Solaris 10.
Try pointing to the 32 bit libs, LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH.
If that doesn't work, try the 64 bit libs, LD_LIBRARY_PATH=/lib64:LD_LIBRARY_PATH.
Complete command:
sudo ./configure --enable-xdebug --with-php-config=/opt/lampp/bin/php-config LD_LIBRARY_PATH=/lib32:LD_LIBRARY_PATH
Maybe the runtime linker's library path is wrong. Does the directory /opt/lampp/lib64 exist? Is lampp a shell script? If so, to what value (and whether) does it set the LD_LIBRARY_PATH variable?