can't install this file (mercury6_2.for) with gfortran - gfortran

I tried this:
Alan#Alan ~/mercury
$ gfortran -o mercury6_2.for
gfortran.exe: fatal error: no input files; unwilling to write output files
compilation terminated
and:
Alan#Alan ~/mercury
$ gfortran -o mercury mercury6_2.for
gfortran.exe: error: CreateProcess: No such file or directory
My file exist:
Alan#Alan ~/mercury
$ ls
big.in element.in mercury.inc mercury6_2.for README.txt
close.in element6.for mercury6.man message.in small.in
close6.for files.in mercury6.tar param.in swift.incenter code here
gfortran seems to be running in Cygwin:
Alan#Alan ~/mercury
$ gfortran --version
GNU Fortran (GCC) 4.8.0 20130302 (experimental) [trunk revision 196403]
Copyright (C) 2013 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
So I don't know.
Is there away that I could do this differently?

Related

Problem compiling bitcoin source code(https://github.com/bitcoin/bitcoin) on linux

Issue: Problem compiling bitcoin source code from https://github.com/bitcoin/bitcoin
Building bitcoin code requires Berkeley DB 4.8( https://github.com/tinybike/get-bdb-4.8).
No problem with that.
My system is running on Ubuntu 20.04.
$ cpp --version
cpp (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ g++ --version
g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
When compiling the bitcoin code, after running 'configure' and 'make' an error occurs indicating that it could not find iostream.h
...
CXX libbitcoin_server_a-txrequest.o
CXX libbitcoin_server_a-txmempool.o
CXX libbitcoin_server_a-validation.o
CXX libbitcoin_server_a-validationinterface.o
CXX libbitcoin_server_a-versionbits.o
CXX wallet/libbitcoin_server_a-init.o
In file included from ./wallet/bdb.h:27,
from wallet/init.cpp:19:
/bitcoin/src/bdb/build_unix/build/include/db_cxx.h:59:10: fatal error: iostream.h: No such file or directory
59 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:8933: wallet/libbitcoin_server_a-init.o] Error 1
make[2]: Leaving directory '/bitcoin/src'
make[1]: *** [Makefile:15214: all-recursive] Error 1
make[1]: Leaving directory '/bitcoin/src'
make: *** [Makefile:809: all-recursive] Error 1
On examining the header files location /usr/include/c++/9 I could not locate iostream.h
Is this a compiler package issue or bitcoin not using c++ iostream header file
I would guess you tried to build the "depends" BDB before installing the required system packages, and that produced an invalid/unusuable build.
Try removing your current "depends" builds and doing them over.
Alternatively, you could just use my db48 PPA for Ubuntu: https://launchpad.net/~luke-jr/+archive/ubuntu/db48
i got the same error,but it came when i build zero-ice with berkeley db. I found some usages about libdb and most of them add #define HAVE_CXX_STDHEADERS at the begining of codes, so i tried add this definition in ICEDIR/cpp/include/IceUtil/Config.h. It works.Wish it works for you.
something was completely wrong during db4.8 compilation
but as temporary fix, you may add in
include/db_cxx.h
#define HAVE_CXX_STDHEADERS 1
this may help, but depends.
imho
most correct way to build db-4.8 for bitcoin
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar zxvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC
build_unix/
../dist/configure --prefix=/usr/local/db48 --enable-cxx --with-pic --disable-replication --disable-shared
make install
cd ../bitcoin-x.x
export BDB_PREFIX=/usr/local/db48
export BDB_LIBS="-L/usr/local/db48/lib -ldb_cxx-4.8"
export BDB_CFLAGS="-I/usr/local/db48/include"
./configure
and etc.

glibcxx_3.4.20 not found

I'm using Ubuntu 14.04, after installing LLVM & Clang, when i tap this in the terminal it reports the error:
wishfay#wishfay-virtual-machine:~$ clang -v
clang: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by clang)
And i check my libstdc++.so.6:
wishfay#wishfay-virtual-machine:~$ locate libstdc++.so.6
/usr/lib/vmware-tools/lib32/libstdc++.so.6
/usr/lib/vmware-tools/lib32/libstdc++.so.6/libstdc++.so.6
/usr/lib/vmware-tools/lib64/libstdc++.so.6
/usr/lib/vmware-tools/lib64/libstdc++.so.6/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py
And my gcc version:
wishfay#wishfay-virtual-machine:~$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
And libstdc++.so.6:
wishfay#wishfay-virtual-machine:~$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH
I want to know how can i get the GLIBCXX_3.4.20 .
According to the ABI page, GLIBCXX_3.4.20 is part of gcc-4.9.
You need to upgrade your version of gcc, or get a clang binary that supports your OS, or you need to build clang from source.

Cross Compile OpenCV for Rpi2 with Java bindings

What I try to do is to cross compile OpenCV from a x86 host machine to an ARM target machine (Raspberry Pi 2) with Java bindings.
All I've achieved is to compile OpenCV with Java bindings for x86 platform, or even OpenCV with NO Java bindings for ARM platform. However I cannot compile OpenCV with Java bindings for ARM platform.
I've kind of followed thousands of guides to do this. This is from OpenCV's official site, and seems to be very simple: http://docs.opencv.org/2.4/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html
My host machine is the following:
$ uname -a:
Linux ubuntu 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 14:46:51 UTC 2015 i686 i686 i686 GNU/Linux
I've installed gcc and g++ cross compilation tools (gnueabi and gnueabihf):
$ sudo apt-get install gcc-arm-linux-gnueabi
$ sudo apt-get install g++-arm-linux-gnueabi
$ sudo apt-get install gcc-arm-linux-gnueabihf
$ sudo apt-get install g++-arm-linux-gnueabihf
$ which arm-linux-gnueabihf-gcc
/usr/bin/arm-linux-gnueabihf-gcc
$ which arm-linux-gnueabihf-g++
/usr/bin/arm-linux-gnueabihf-g++
Since I want to compile OpenCV with the Java bindings, I installed jdk and ant:
$ sudo apt-get install openjdk-7-jre
$ sudo apt-get install openjdk-7-jdk
$ sudo apt-get install ant
Then I add these lines to .bashrc file:
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
PATH=$JAVA_HOME/bin:$PATH
export PATH
Then I execute:
$ source $HOME/.bashrc
I've downloaded OpenCV's source code and moved to the platforms/linux folder as the official guide does:
$ cd ~/opencv/platforms/linux
$ mkdir -p build_hardfp
$ cd build_hardfp
Then in the "opencv/platforms/arm-gnueabi.toolchain.cmake" file, replaced these lines:
set(CMAKE_C_COMPILER arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-gcc-${GCC_COMPILER_VERSION})
set(CMAKE_CXX_COMPILER arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-g++-${GCC_COMPILER_VERSION})
by these:
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
In order to use arm compiler instead of x86's.
Then I try to get cmake ready:
$ cmake -DBUILD_SHARED_LIBS=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../..
Cmake's output tells it will use arm cross compiler for ARM platform target, but it will not use Java bindings:
...
-- Platform:
-- Host: Linux 4.2.0-16-generic i686
-- Target: Linux 1 arm
-- CMake: 3.2.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
...
C++ Compiler: /usr/bin/arm-linux-gnueabihf-g++ (ver 5.2.1)
...
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java python viz
So, I try to set cmake compile variables by myself without using cmake's toolchain file:
$ export CMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc
$ export CMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabihf-g++
$ cmake -DBUILD_SHARED_LIBS=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO ../../..
Now cmake's output tells it will include Java support, but it won't use arm cross compiler:
...
-- Platform:
-- Host: Linux 4.2.0-16-generic i686
-- CMake: 3.2.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
...
C++ Compiler: /usr/bin/c++ (ver 5.2.1)
...
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda python viz
Of course, if I execute make command with this latest cmake configuration, this is the ".so" file I get:
$ readelf -h lib/libopencv_java249.so | grep Machine
Machine: Intel 80386
where it should tell:
Machine: ARM
So, once again: I can compile OpenCV with Java bindings for x86 platform, or either OpenCV with NO Java bindings for ARM platform, but not both.
How should I do this?
Thank you!
UPDATE 1:
#Notlikethat I forgot to tell I had already tried that (i.e. use ARM jdk instead of x86). I did not mention it because I though I should be using x86.
However, I have tried it again:
I've downloaded ARM's jdk, set JAVA_HOME and PATH variables properly to point this new jdk and tried cmake command.
The result is the same, it lets me compile for ARM without Java bingings, or for x86 with Java bindings.
UPDATE 2:
I've added the following variables to the "arm-gnueabi.toolchain.cmake" file:
set(JAVA_HOME /usr/lib/jvm/jdk1.7.0_60_ARM)
set(JAVA_AWT_LIBRARY $JAVA_HOME/include/jawt.h)
set(JAVA_JVM_LIBRARY $JAVA_HOME/jre/lib/arm/jvm.cfg)
set(JAVA_INCLUDE_PATH $JAVA_HOME/include/jni.h)
set(JAVA_INCLUDE_PATH2 $JAVA_HOME/include/linux/jni_md.h)
set(JAVA_AWT_INCLUDE_PATH $JAVA_HOME/include/jawt.h)
Now if I execute:
$ cmake -DBUILD_SHARED_LIBS=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../..
the output shows that java module is still unavailable, but at least, one of its key dependencies is ok (JNI):
...
-- Java:
-- ant: NO
-- JNI: $JAVA_HOME/include/jni.h $JAVA_HOME/include/linux/jni_md.h $JAVA_HOME/include/jawt.h
-- Java tests: NO
...
I'm pretty sure the problem here is the fact that ant is not found, which I can't understand.
Ant is installed:
$ echo $PATH:/usr/lib/jvm/jdk1.7.0_60_ARM/bin:/opt/apache/ant/apache-ant-1.9.6/bin:...
I've retried by adding the following variables to the "arm-gnueabi.toolchain.cmake" file, without success:
set(ANT_HOME /opt/apache/ant/apache-ant-1.9.6)
set(JAVA_ANT $ANT_HOME/bin/ant)

Ada cross-compiler for iOS targets

tl;dr
How can I compile Ada source code to a static library file suitable for apps on iPad targets running iOS to link against? (GCC is not a requirement. Solutions using LLVM or others are also welcome!)
I have a large library of portable Ada code that I would like to use in an iPad/iOS project. My host OS is Mac OS X 10.9 (running GCC 4.8.1 installed at /opt/local with MacPorts). To do this, I'm trying to build a GCC ARM cross-compiler with Ada support.
I am able to build a working GCC and GNAT that creates ARM executables, but I can't seem to build or install the Ada standard library, which is required for building my Ada code
The source packages I'm using:
gcc-4.8.1
binutils-2.24
libiconv-1.14
gmp-5.1.3
mpc-1.0.2
mpfr-3.1.2
The GCC build configuration:
$ bin/arm-none-eabi-gcc -v --version
Using built-in specs.
COLLECT_GCC=bin/arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/lto-wrapper
arm-none-eabi-gcc (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Target: arm-none-eabi
Configured with: /Users/ardnew/cross/src/gcc-4.8.1/configure --target=arm-none-eabi --prefix=/Users/ardnew/cross --with-cpu=cortex-a8 --enable-languages=c,ada --disable-multilib --enable-interwork --disable-threads --disable-shared --disable-nls --disable-lto --disable-libssp --disable-decimal-float --disable-libgomp --disable-libmudflap
Thread model: single
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '--version' '-mcpu=cortex-a8'
/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/cc1 -quiet -v -D__USES_INITFINI__ help-dummy -quiet -dumpbase help-dummy -mcpu=cortex-a8 -auxbase help-dummy -version --version -o /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccrSSKFx.s
GNU C (GCC) version 4.8.1 (arm-none-eabi)
compiled by GNU C version 4.8.1, GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-v' '--version' '-mcpu=cortex-a8'
/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/as -mcpu=cortex-a8 -meabi=5 --version -o /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccZYvQLp.o /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccrSSKFx.s
GNU assembler (GNU Binutils) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `arm-none-eabi'.
COMPILER_PATH=/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/libexec/gcc/arm-none-eabi/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/
LIBRARY_PATH=/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/:/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib/
COLLECT_GCC_OPTIONS='-v' '--version' '-mcpu=cortex-a8'
/Users/ardnew/cross/libexec/gcc/arm-none-eabi/4.8.1/collect2 -X --version /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crti.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtbegin.o crt0.o -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1 -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccZYvQLp.o --start-group -lgcc -lc --end-group /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtend.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtn.o
collect2 version 4.8.1
/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld -X --version /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crti.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtbegin.o crt0.o -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1 -L/Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/lib /var/folders/4c/y_sll7bj6b9bt15389wr66_80000gn/T//ccZYvQLp.o --start-group -lgcc -lc --end-group /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtend.o /Users/ardnew/cross/lib/gcc/arm-none-eabi/4.8.1/crtn.o
GNU ld (GNU Binutils) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
Test program to ensure its building ARM binaries:
$ cat told_unit1.adb told_unit1.ads
--
-- FILE: told_unit1.adb
--
with Ada.Text_IO;
use Ada.Text_IO;
package body told_unit1 is
procedure hello is
begin
put_line("hello, world");
end hello;
function double(x : in float) return float is
begin
return x + x;
end double;
end told_unit1;
--
-- FILE: told_unit1.ads
--
package told_unit1 is
procedure hello;
pragma Export
(
convention => C,
entity => hello,
external_name => "ada_hello"
);
function double(x : in float) return float;
pragma Export
(
convention => C,
entity => double,
external_name => "ada_double"
);
end told_unit1;
Then compiling the Ada code and inspecting it with file:
$ arm-none-eabi-gcc -c told_unit1.adb
$ file told_unit1.o
told_unit1.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
And then when I try to bind the library object file it pukes:
$ arm-none-eabi-gnatbind -aO$ADA_OBJECT_PATH -Ltold told_unit1
error: "a-textio.ali" not found, "a-textio.adb" must be compiled
Going back to my GCC build logs, I found that libada (which I believe is part of GNAT) wasn't ever built. When I try to run make all-target-libada from the GCC build directory, it eventually tells me:
Configuring in arm-none-eabi/libada
configure: loading cache ./config.cache
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... arm-none-eabi
checking target system type... arm-none-eabi
checking for arm-none-eabi-gcc... /Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/xgcc -B/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/ -B/Users/ardnew/cross/arm-none-eabi/bin/ -B/Users/ardnew/cross/arm-none-eabi/lib/ -isystem /Users/ardnew/cross/arm-none-eabi/include -isystem /Users/ardnew/cross/arm-none-eabi/sys-include
checking for C compiler default output file name...
configure: error: in `/Users/ardnew/cross/src/gcc-4.8.1-obj/arm-none-eabi/libada':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [configure-target-libada] Error 1
And so I go inspect that config.log its referring to and find the following:
configure:2351: $? = 0
configure:2340: /Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/xgcc -B/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/ -B/Users/ardnew/cross/arm-none-eabi/bin/ -B/Users/ardnew/cross/arm-none-eabi/lib/ -isystem /Users/ardnew/cross/arm-none-eabi/include -isystem /Users/ardnew/cross/arm-none-eabi/sys-include -v >&5
COLLECT_LTO_WRAPPER=/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/lto-wrapper
Target: arm-none-eabi
Configured with: /Users/ardnew/cross/src/gcc-4.8.1/configure --target=arm-none-eabi --prefix=/Users/ardnew/cross --with-cpu=cortex-a8 --enable-languages=c,ada --disable-multilib --enable-interwork --disable-threads --disable-shared --disable-nls --disable-lto --disable-libssp --disable-decimal-float --disable-libgomp --disable-libmudflap
configure:2351: $? = 0
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:2351: $? = 1
configure:2371: checking for C compiler default output file name
configure:2393: /Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/xgcc -B/Users/ardnew/cross/src/gcc-4.8.1-obj/./gcc/ -B/Users/ardnew/cross/arm-none-eabi/bin/ -B/Users/ardnew/cross/arm-none-eabi/lib/ -isystem /Users/ardnew/cross/arm-none-eabi/include -isystem /Users/ardnew/cross/arm-none-eabi/sys-include -g -O2 conftest.c >&5
/Users/ardnew/cross/arm-none-eabi/bin/ld: cannot find crt0.o: No such file or directory
/Users/ardnew/cross/arm-none-eabi/bin/ld: cannot find -lg
/Users/ardnew/cross/arm-none-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
configure:2397: $? = 1
configure:2434: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2440: error: in `/Users/ardnew/cross/src/gcc-4.8.1-obj/arm-none-eabi/libada':
configure:2444: error: C compiler cannot create executables
See `config.log' for more details.
So at this point I'm way over my head and not really sure what to do next. It looks like I'm missing a C runtime library for ARM maybe?
Any help configuring GNAT/libada for ARM targets would be great.
Alternatively- is there a simpler way to link against Ada libraries from an Xcode iOS project?
Unfortunately, the answer is that there is no auto-magic tool to accomplish this. You can use tooling to validate the translations after the fact, but what you want isn't available yet.
I've had to deal with this same question in the past. A different answer would have dramatically changed one of my project's budgets, too. Perhaps someday.
Though I admit, I think there are ultimately enough incompatibilities that your source would need to be drastically altered - reducing the value of what you are looking to achieve here. In the end, the new investment is a bummer but will result in better source, if you can afford it.

Errors due to vowpal wabbit's dependencies on boost library

I'm trying real hard to install vowpal wobbit and it fails when i run the make file, throwing:
cd library; make; cd ..
g++ -g -o ezexample temp2.cc -L ../vowpalwabbit -l vw -l allreduce -l boost_program_options -l z -l pthread
ld: library not found for -lboost_program_options collect2: ld returned 1 exit status make[1]: *** [ezexample] Error 1'
I then added the links to the boost library here by specifying -L/usr/local/lib
Now I get the following error:
g++ -g -o ezexample temp2.cc -L/usr/local/lib ../vowpalwabbit -l vw -l allreduce -l boost_program_options -l z -l pthread
ld: library not found for -lvw
collect2: ld returned 1 exit status
make: *** [ezexample] Error 1
I happened to get everything working on OS X 10.7 as follows:
Make sure you have a working Boost installation. As indicated on the Getting started page, usually we only need header files, but some Boost libraries must be built separately, including the program_options library which is used to process options from command line or config file. Go into your boost folder, and then at your shell prompt:
$ ./bootstrap.sh
$ ./bjam
This will compile and build everything. You should now have a bin.v2/ directory in your boost directory, with all built libraries for your system (static and threaded libs).
$ ls bin.v2/libs/
date_time iostreams python serialization test
filesystem math random signals thread
graph program_options regex system wave
More importantly, extra Boost libraries are made available in the stage/lib/ directory. For me, these are Mach-O 64-bit dynamically linked shared library x86_64.
The include path should be your_install_dir/boost_x_xx_x, where boost_x_xx_x is the basename of your working Boost. (I personally have boost_1_46_1 in /usr/local/share/ and I symlinked it to /usr/local/share/boost to avoid having to remember version number.) The library path (for linking) should read your_install_dir/boost_x_xx_x/stage/lib. However, it might be best to symlink or copy (which is what I did) everything in usual place, i.e. /usr/local/include/boost for header files, and /usr/local/lib for libraries.
Edit the Makefile from the vowpal_wabbit directory, and change the include/library paths to reflect your current installation. The Makefile should look like this (first 12 lines):
COMPILER = g++
UNAME := $(shell uname)
ifeq ($(UNAME), FreeBSD)
LIBS = -l boost_program_options -l pthread -l z -l compat
BOOST_INCLUDE = /usr/local/include
BOOST_LIBRARY = /usr/local/lib
else
LIBS = -l boost_program_options -l pthread -l z
BOOST_INCLUDE = /usr/local/share/boost # change path to reflect yours
BOOST_LIBRARY = /usr/local/share/boost/stage/lib # idem
endif
Then, you are ready to compile vowpal_wabbit (make clean in case you already compiled it):
$ make
$ ./vw --version
6.1
$ make test
You can also install vowpal wabbit on OS X using brew:
brew install vowpal-wabbit
Or you can just install boost, and then install vw from the github repo.
brew install boost
For installation on CentOS 7 (6.5 perl version is too old for latest vw source code), I've found the instructions at http://wkoplitz.blogspot.be/2012/12/vowpal-wabbit-on-centos.html to work fine:
yum install zlib-devel boost-devel
yum groupinstall "Development Tools"
git clone git://github.com/JohnLangford/vowpal_wabbit.git
cd vowpal_wabbit
./autogen.sh
make
make test
Good news:
As of the latest release VowpalWabbit version 9.1.0, vw no longer relies on Boost program_options
From the release highlights:
Removal of Boost Program Options dependency
For a long time we have depended on Boost Program Options
for command line options parsing. In this release, we have > replaced this dependency with our own implementation of
command line parsing. Apart from one place where we depend > on Boost Math in standalone mode, this means that VW core
and the command line tool are free of Boost dependencies
hopefully making the code a bit easier to build and package.
Vowpal Wabbit 9.1.0 release notes

Resources