'configure' failing with Android NDK standalone toolchain - gcc

I'm trying to build something with the Android NDK standalone compiler toolchain, but I'm getting this error:
Updating bundled third-party dependencies...
bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
cp output/libFColladaSD.a ../lib/libFColladaSD.a
cp output/libFColladaSR.a ../lib/libFColladaSR.a
Building SpiderMonkey...
SpiderMonkey build options: --disable-tests
loading cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking for mawk... mawk
checking for perl5... no
checking for perl... /usr/bin/perl
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... arm-linux-androideabi-g++
checking whether the C++ compiler (arm-linux-androideabi-g++ ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.
ERROR: SpiderMonkey build failed
This is what the config.log says: http://pastebin.com/5AFZG4CX
My ANDROID_NDK_ROOT is set as follows:
afeder#ubuntu:~/android/0ad/build/workspaces$ echo $ANDROID_NDK_ROOT
/home/afeder/android/android-ndk-r7-crystax-4
What might be the cause or how do I debug it? Thank you.

To me this looks broken:
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
Here's how I'd set up the environment for my Android NDK build:
export CROSS_COMPILE=arm-linux-androideabi
export CC=${CROSS_COMPILE}-gcc
export CXX=${CROSS_COMPILE}-g++
... other binutils as needed ...
export NDK=/home/afeder/android/android-ndk-r7-crystax-4
export SYSROOT=$NDK/platforms/android-8/arch-arm
PATH=$PATH:$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
Make sure and add --sysroot=$SYSROOT to CFLAGS, CPPFLAGS, and/or CXXFLAGS.
Now you need to tell the spidermonkey configure that you are cross compiling:
./configure --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --target=arm-linux-androideabi

It looks like it can't find arm-linux-androideabi-g++. Try searching for it in the NDK folder and adding the directory to your PATH.
Mine is here:
ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++

Related

Error after .configure to install Omnet++ 5.6.1 on Mac

I am trying to get Omnet++ to run on my Mac and i am at the following step:
3.6. Configuring and Building OMNeT++
Check configure.user to make sure it contains the settings you need. In most cases
you don’t need to change anything in it.
In the top-level OMNeT++ directory, type:
$ ./configure
The configure script detects installed software and configuration of your system.
It writes the results into the Makefile.inc file, which will be read by the makefiles
during the build process.
But my log shows me this and i don't understand what i did wrong or where i should make changes:
checking build system type... x86_64-apple-darwin21.1.0
checking host system type... x86_64-apple-darwin21.1.0
configure: -----------------------------------------------
configure: reading configure.user for your custom settings
configure: -----------------------------------------------
checking for icc... 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 for icpc... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++... g++
checking for ranlib... ranlib
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
checking whether g++ supports -fno-omit-frame-pointer... yes
checking whether g++ supports -Wl,--no-as-needed... no
checking whether g++ supports -Wl,--as-needed... no
checking if shared libs need -fPIC... no
checking for dlopen with CFLAGS="" LIBS=""... yes
checking if --export-dynamic linker option is supported/needed... test failed
checking for flags needed to link with static libs containing simple modules... -all_load
configure: NOTE: Use the following syntax when linking with static libraries
configure: containing simple modules and other dynamically registered components:
configure: g++ ... -Wl,-all_load <libs> ...
checking whether linker supports -rpath... yes
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for make... make
checking for perl... perl
checking for swig... not found
checking for math with CFLAGS="" LIBS=""... yes
checking for standard C++ lib with CFLAGS="" LIBS="-lstdc++"... yes
checking for dlopen with CFLAGS="" LIBS=""... yes
checking for qmake... no
checking for qmake-qt5... no
checking for qmake5... no
configure: error: Qtenv cannot find qmake -- maybe it is not in the PATH or has some exotic name (tested names were: qmake qmake-qt5 qmake5) - disabling Qtenv. You can try setting the QT_PATH variable in configure.user to a valid location.
Make sure you have sourced the setenv script with
source setenv
before trying to run the configure script.
Also, why not use OMNeT++ 5.7 ?

configure: error: cannot run C compiled programs. when installing libtools-2.4.2

Have been struggling to set up my environment to run bioinformatics tools. The issue started with a consistent autogen.sh error in autoreconf -fi: command not found for multiple applications. Reinstalled autoconf, automake, libtools.
Currently, libtools installation fails at ./configure, but autoconf and automake installed successfully.
Here is the error:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... libltdl/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 build system type... x86_64-apple-darwin18.0.0
checking host system type... x86_64-apple-darwin18.0.0
configure: autobuild project... GNU Libtool
configure: autobuild revision... 2.4.2 ()
configure: autobuild hostname... MACUSR
configure: autobuild mode... default
configure: autobuild timestamp... 2019011
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... configure: error: in `/usr/local/libtool-2.4.2':
configure: error: cannot run C compiled programs.
Tried Homebrew, it installed all my tools in usr/local/Cellar and nothing runs, I have added tool locations to my PATH variable, but no luck. Traced problem to jamf issue:
https://www.jamf.com/jamf-nation/discussions/28764/jamf-quickadd-symlinks-usr-local-bin-causing-install-problems-for-other-apps
Stuck and will be happy for an advice here.
Long story short, it was an old gcc problem. My PATH referenced to anaconda3/bin first, where it was triggering whatever gcc it found there. After changing my $PATH to point to other bins before anaconda3, everything compiled without issues.
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Error while installing wxpropertygrid on Ubuntu 14.04

I am trying to install wxpropertygrid. I have successfully installed wxwidgets. I have included the path to the library of the wxwidgets in the LD_LIBRARY_PATH variable. I have also tried the linking options present in the configure script (--with-wx-prefix). This is the error that I get
root#caos-intel3:~/installationfolders/wxpropertygrid/propgrid
./configure --prefix=/root/installedsoftware/wxpropgrid
--with-wx-prefix=/root/installedsoftware/wxwidgets/
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 the --enable-debug option... will be automatically detected
checking for the --enable-unicode option... will be automatically detected
checking for the --enable-shared option... will be automatically detected
checking for the --with-toolkit option... will be automatically detected
checking for the --with-wxshared option... will be automatically detected
checking for the --with-wxversion option... will be automatically detected
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 ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for wx-config... /root/installedsoftware/wxwidgets//bin/wx-config
checking for wxWidgets version >= 2.6.1... yes (version 3.0.2)
checking for wxWidgets static library... no
checking if wxWidgets was built with UNICODE enabled... yes
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... no
checking which wxWidgets toolkit was selected... configure: error:
Cannot detect the currently installed wxWidgets port !
Please check your 'wx-config --cxxflags'...
wxWidgets 3.0.2, that you use, already includes wxPropertyGrid and related classes, you don't have to install anything extra.

No acceptable C compiler found in $PATH

So here's the situation. I want to setup a portable programming environment by installing my programming stuff (Vim, Clang, Git, GCC) in a single folder that I can create on any Mac. I am installing everything in /opt, which isn't there by default and I should have write permissions to create. I got Vim, Clang, and Git working by downloading the Xcode Command Line Tools and a program that can extract the contents of the PKG's. I put everything in their respective folders in /opt, e.g /opt/usr/bin. They are all doing dandy.
Here's the problem. I am trying to get GCC to work. I downloaded the OSX GCC Installer and did the same technique with GCC-4.2. The problem is that when I do a test compile, I run this. Edit: I get the same error message if I do CC=gcc-4.2
./configure --prefix=/opt/usr/bin
and receive
checking build system type... x86_64-apple-darwin11.4.2
checking host system type... x86_64-apple-darwin11.4.2
checking target system type... x86_64-apple-darwin11.4.2
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/opt/gcc-master':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
This is strange because GCC-4.2 is in my $PATH
echo $PATH
/opt/usr/bin:/opt/usr/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
cd /opt/usr/bin ; ls | grep gcc
gcc
gcc-4.2
i686-apple-darwin11-gcc-4.2.1
FYI: 'gcc' is a symlink that doesn't point to anything.
which gcc-4.2
/opt/usr/bin/gcc-4.2
I solved this by adding this to my .zshrc. It forces any configure script to look for gcc-4.2 instead of gcc.
CC=/opt/usr/bin/gcc-4.2
configure: error: no acceptable C compiler found in $PATH
Before executing the ./configure command, i used the command:
sudo apt install gcc
And the error 'no acceptable ...' is solved.

how to compile libcurl with arch armv7s under macosx?

I have installed Xcode 4.5 and iOS6.0 SDK , MacOSX 10.7 SDK,command line tools on my computer. I download libcurl from http://curl.haxx.se/download/curl-7.27.0.tar.gz and compiled it for iOS with arch armv7s.
I did follows:
export
CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch armv7s"
export LDFLAG="-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk
--Wl,-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk"
export CFLAG="-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk"
./configure --host=arm-apple-darwin10
and get errors below:
$ ./configure --host=arm-apple-darwin10
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for arm-apple-darwin10-ar... no
checking for ar... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for arm-apple-darwin10-strip... no
checking for strip... strip
checking curl version... 7.27.0
checking build system type... i386-apple-darwin12.2.0
checking host system type... arm-apple-darwin10
checking for style of include used by make... GNU
checking for arm-apple-darwin10-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s
checking for C compiler default output file name...
configure: error: in `/Users/eric/working/curl-7.27.0':
configure: error: C compiler cannot create executables
See `config.log' for more details.
does anyone known how to do it?

Resources