How to resolve the Undefined References? - linux

In trying to making a file on ubuntu using terminal, I am getting a series of these undefined reference statements:
Node.cpp:(.text+0x978): undefined reference to glLineWidth'
Node.cpp:(.text+0x996): undefined reference toglPushMatrix'
Node.cpp:(.text+0x9fb): undefined reference to glTranslatef'
Node.cpp:(.text+0xa0b): undefined reference toglColor3fv'
.
.
Parser.cpp:(.text+0x1a69): undefined reference to wxLogVerbose(wchar_t const*, ...)'
Parser.cpp:(.text+0x1a8e): undefined reference towxLogVerbose(wchar_t const*, ...)'
Parser.cpp:(.text+0x1e4d): undefined reference to `wxLogError(wchar_t const*, ...)'
collect2: error: ld returned 1 exit status
make: * [aqua3d] Error 1**
Kindly let me know what is solution to this.
FYI, I've already installed freeglut, libgtk and libwxgtk.

Related

Porting LUA to SGX application

I want to use Luacpp in an SGX application. For example, in the SampleEnclave application, I want to send some Lua codes to be executed securely in SGX.
I have updated the Enclave's MakeFile to make the SampleEnclave app Lua compatible. But getting below error:
/usr/local/bin/ld: Enclave/Enclave.o: warning: relocation against `_ZTVN6LuaCpp6Engine10LuaTStringE' in read-only section `.text._ZN6LuaCpp6Engine10LuaTStringD2Ev[_ZN6LuaCpp6Engine10LuaTStringD5Ev]'
/usr/local/bin/ld: /usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
/usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
/usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
/usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
/usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
/usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
/usr/local/bin/ld: DWARF error: section .debug_str is larger than its filesize! (0x55ebb vs 0x40078)
Enclave/Enclave.o:/usr/local/include/LuaCpp/Engine/LuaTString.hpp:62: undefined reference to `LuaCpp::Engine::LuaType::LuaType()'
/usr/local/bin/ld: Enclave/Enclave.o:/usr/local/include/LuaCpp/Engine/LuaTString.hpp:62: undefined reference to `vtable for LuaCpp::Engine::LuaTString'
/usr/local/bin/ld: Enclave/Enclave.o:/usr/local/include/LuaCpp/Engine/LuaTString.hpp:67: undefined reference to `vtable for LuaCpp::Engine::LuaTString'
/usr/local/bin/ld: Enclave/Enclave.o:/usr/local/include/LuaCpp/Engine/LuaTString.hpp:67: undefined reference to `LuaCpp::Engine::LuaType::~LuaType()'
/usr/local/bin/ld: Enclave/Enclave.o: in function `ecall_test':
/home/alam/practice/LuaEnclave/Enclave/Enclave.cpp:55: undefined reference to `LuaCpp::LuaContext::AddGlobalVariable(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<LuaCpp::Engine::LuaType>)'
/usr/local/bin/ld: /home/alam/practice/LuaEnclave/Enclave/Enclave.cpp:56: undefined reference to `LuaCpp::LuaContext::CompileString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/bin/ld: /home/alam/practice/LuaEnclave/Enclave/Enclave.cpp:62: undefined reference to `LuaCpp::LuaContext::Run(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/bin/ld: /home/alam/practice/LuaEnclave/Enclave/Enclave.cpp:69: undefined reference to `LuaCpp::Engine::LuaTString::getValue() const'
/usr/local/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:256: enclave.so] Error 1
make[1]: Leaving directory '/home/alam/practice/LuaEnclave'
make: *** [Makefile:181: all] Error 2
Can I get rid of the dynamic library dependency from LUA? Because SGX does not support dynamic libraries in Enclave.

gcc10 compile c++ code and link to libraries compiled by gcc11

I am using gcc10 for my code. My system installed the official libraries compiled by gcc11.
OS:archlinux
compiler: gcc-10
Archlinux updated their official compiler to gcc-11.
When I use gcc10 to compile my code and link to the libraries compiled by gcc11, it shows the following error message:
/usr/bin/ld: /usr/lib/libQt5Core.so.5.15.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()#CXXABI_1.3.13'
/usr/bin/ld: /usr/lib/libQt5Widgets.so.5.15.2: undefined reference to `std::__throw_bad_array_new_length()#GLIBCXX_3.4.29'
/usr/bin/ld: /usr/lib/libQt5Core.so.5.15.2: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()#CXXABI_1.3.13'
It seems related to stdc++ libraries. What should I do?
------------------------------------------
I tried to use gcc11 to compile everything including the libraries. It is fine to compile the libraries that I need.
When I compile my code, it shows the error messages:
/usr/bin/ld: CMakeFiles/depth_camera_slam.dir/main.cpp.o: in function `__gnu_cxx::new_allocator<double*>::allocate(unsigned long, void const*)':
/usr/include/c++/11.1.0/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: CMakeFiles/depth_camera_slam.dir/main.cpp.o: in function `__gnu_cxx::new_allocator<ceres::Grid2D<double, 1, true, true> >::allocate(unsigned long, void const*)':
/usr/include/c++/11.1.0/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: CMakeFiles/depth_camera_slam.dir/main.cpp.o: in function `__gnu_cxx::new_allocator<ceres::BiCubicInterpolator<ceres::Grid2D<double, 1, true, true> > >::allocate(unsigned long, void const*)':
/usr/include/c++/11.1.0/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: CMakeFiles/depth_camera_slam.dir/main.cpp.o: in function `__gnu_cxx::new_allocator<std::shared_ptr<Keyframe> >::allocate(unsigned long, void const*)':
/usr/include/c++/11.1.0/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: CMakeFiles/depth_camera_slam.dir/main.cpp.o: in function `__gnu_cxx::new_allocator<unsigned long>::allocate(unsigned long, void const*)':
/usr/include/c++/11.1.0/ext/new_allocator.h:110: undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: CMakeFiles/depth_camera_slam.dir/main.cpp.o:/usr/include/c++/11.1.0/ext/new_allocator.h:110: more undefined references to `std::__throw_bad_array_new_length()' follow
/usr/bin/ld: /usr/local/lib/libopencv_core.so.3.4.15: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()#CXXABI_1.3.13'
/usr/bin/ld: /usr/lib/libvtkRenderingCore.so.1: undefined reference to `std::__istream_extract(std::istream&, char*, long)#GLIBCXX_3.4.29'
/usr/bin/ld: ../lib/libdataset_inputstream.so: undefined reference to `std::__throw_bad_array_new_length()#GLIBCXX_3.4.29'
/usr/bin/ld: /usr/local/lib/libopencv_core.so.3.4.15: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()#CXXABI_1.3.13'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/depth_camera_slam.dir/build.make:351: ../bin/depth_camera_slam] Error 1
make[1]: *** [CMakeFiles/Makefile2:804: CMakeFiles/depth_camera_slam.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Is it related to stdc++ lib? or my compiler? I think my code is fine because I can compile it on my old machine (archlinux but the compiler is gcc10).
-------------------------------------
I can't uninstall gcc10 because I am using CUDA11 which depends on gcc10.

Cannot compile example code in libpca

I'm trying to install the libpca package.
I've already have Armadillo set up.
The libpca package is unzipped to /my/dir/. And I set the CPLUS_INCLUDE_PATH and other variables to the place Armadillo installed. (export CPLUS_INCLUDE_PATH=/my/dir/arma_install/include/:$CPLUS_INCLUDE_PATH)
I run the following command to install libpca:
/my/dir/libpca-1.3.3$ ./configure --prefix=/my/dir/libpca-1.3.3
/my/dir/libpca-1.3.3$ make
which has warnings but no error. And the command:
/my/dir/libpca-1.3.3$ make install prefix=/my/dir/libpca-1.3.3
It seems good and no error is reported.
Then I try to compile and run the example file in /my/dir/libpca-1.3.3/examples/simple/pca_example.cpp. In dir examples, I run
/my/dir/libpca-1.3.3/examples$ make
It returns
make[1]: Nothing to be done for 'all'
make[1]: Nothing to be done for 'all-am'
And no new file is created. Then I cd into examples/simple, and run
/my/dir/libpca-1.3.3/examples/simple$ make
It returns:
make: Nothing to be done for 'all'
And no new file is created. Then I run
/my/dir/libpca-1.3.3/examples/simple$ make check
It returns the following errors:
The variables wrapper_dsyev_, wrapper_dgemv_, wrapper_dgemm_, etc. in the errors above, exist in the following binaries:
/my/dir/arma_install/lib64/libarmadillo.so.8.500.0
/my/dir/arma_downloaded/CMakeFiles/armadillo.dir/src/wrapper.cpp.o
/my/dir/arma_downloaded/CMakeFiles/CMakeRelink.dir/libarmadillo.so.8.500.0
After I export them into LD_LIBRARY_PATH, the same errors are still returned.
I think there should be something wrong with the include path, and environment variables. How do I solve it?
Moreover, if I need to write code in /my/dir/working_dir/, how can I set the path?
----------------------------------edited below--------------------
When I made the update described below, at step 3:
/my/dir/libpca-1.3.3$ LD_LIBRARY_PATH=/my/dir/arma_install/lib64 make check
It returns the following errors:
LD_LIBRARY_PATH=/my/dir/arma_install/lib64/ make check
Making check in src/lib
make[1]: Entering directory `/my/dir/libpca-1.3.3/src/lib'
make[1]: Leaving directory `/my/dir/libpca-1.3.3/src/lib'
Making check in test
make[1]: Entering directory `/my/dir/libpca-1.3.3/test'
make unittest
make[2]: Entering directory `/my/dir/libpca-1.3.3/test'
/bin/sh ../libtool --tag=CXX --mode=link g++ -I../src/lib
-pthread -O2 -o unittest main.o testcases.o test_pca.o test_utils.o ../src/lib/.libs/libpca.a -L/my/dir/source_scripts/lib64
libtool: link: g++ -I../src/lib -pthread -O2 -o unittest main.o
testcases.o test_pca.o test_utils.o ../src/lib/.libs/libpca.a
-L/my/dir/arma_install/lib64 -pthread
test_utils.o: In function `void arma::glue_times::apply, arma::Mat
(arma::Mat&, arma::Mat const&, arma::Mat const&, double)':
test_utils.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb1ELb0ELb1ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb1ELb0ELb1ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x169):
undefined reference to `wrapper_dgemm_'
test_utils.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb1ELb0ELb1ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb1ELb0ELb1ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x363):
undefined reference to `wrapper_dgemv_'
test_utils.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb1ELb0ELb1ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb1ELb0ELb1ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x45c):
undefined reference to `wrapper_dsyrk_'
../src/lib/.libs/libpca.a(pca.o): In function
`stats::pca::bootstrap_eigenvalues_()':
pca.cpp:(.text+0x454d): undefined reference to `wrapper_dsyev_'
pca.cpp:(.text+0x4953): undefined reference to `wrapper_dsyevd_'
../src/lib/.libs/libpca.a(pca.o): In function `bool
arma::auxlib::eig_sym_dc
(arma::Col&, arma::Mat&, arma::Base > const&)':
pca.cpp:(.text._ZN4arma6auxlib10eig_sym_dcIdNS_3MatIdEEEEbRNS_3ColIT_EERNS2_IS5_EERKNS_4BaseIS5_T0_EE[_ZN4arma6auxlib10eig_sym_dcIdNS_3MatIdEEEEbRNS_3ColIT_EERNS2_IS5_EERKNS_4BaseIS5_T0_EE]+0x13a):
undefined reference to `wrapper_dsyevd_'
../src/lib/.libs/libpca.a(pca.o): In function `bool
arma::eig_sym
(arma::Col::pod_type>&, arma::Mat::elem_type>&,
arma::Base::elem_type, arma::Mat > const&,
char const*,
arma::arma_blas_type_only::elem_type>::result
const*)':
pca.cpp:(.text._ZN4arma7eig_symINS_3MatIdEEEEbRNS_3ColINT_8pod_typeEEERNS1_INS4_9elem_typeEEERKNS_4BaseIS8_S4_EEPKcPKNS_19arma_blas_type_onlyIS8_E6resultE[_ZN4arma7eig_symINS_3MatIdEEEEbRNS_3ColINT_8pod_typeEEERNS1_INS4_9elem_typeEEERKNS_4BaseIS8_S4_EEPKcPKNS_19arma_blas_type_onlyIS8_E6resultE]+0x1a0):
undefined reference to `wrapper_dsyev_'
../src/lib/.libs/libpca.a(pca.o): In function `double
arma::auxlib::det_lapack(arma::Mat const&, bool)':
pca.cpp:(.text._ZN4arma6auxlib10det_lapackIdEET_RKNS_3MatIS2_EEb[_ZN4arma6auxlib10det_lapackIdEET_RKNS_3MatIS2_EEb]+0x117):
undefined reference to `wrapper_dgetrf_'
../src/lib/.libs/libpca.a(pca.o): In function `void arma::gemv::apply_blas_type >(double*,
arma::Mat const&, double const*, double, double)':
pca.cpp:(.text._ZN4arma4gemvILb1ELb0ELb0EE15apply_blas_typeIdNS_3MatIdEEEEvPT_RKT0_PKS5_S5_S5_[_ZN4arma4gemvILb1ELb0ELb0EE15apply_blas_typeIdNS_3MatIdEEEEvPT_RKT0_PKS5_S5_S5_]+0x86):
undefined reference to `wrapper_dgemv_'
../src/lib/.libs/libpca.a(pca.o): In function `void arma::gemv::apply_blas_type >(double*,
arma::Mat const&, double const*, double, double)':
pca.cpp:(.text._ZN4arma4gemvILb0ELb0ELb0EE15apply_blas_typeIdNS_3MatIdEEEEvPT_RKT0_PKS5_S5_S5_[_ZN4arma4gemvILb0ELb0ELb0EE15apply_blas_typeIdNS_3MatIdEEEEvPT_RKT0_PKS5_S5_S5_]+0x86):
undefined reference to `wrapper_dgemv_'
../src/lib/.libs/libpca.a(pca.o): In function `void
arma::glue_times::apply, arma::Mat >(arma::Mat&,
arma::Mat const&, arma::Mat const&, double)':
pca.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x129):
undefined reference to `wrapper_dgemm_'
pca.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb0ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x334):
undefined reference to `wrapper_dgemv_'
../src/lib/.libs/libpca.a(pca.o): In function `void
arma::glue_times::apply,
arma::Mat >(arma::Mat&, arma::Mat const&,
arma::Mat const&, double)':
pca.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb0ELb1ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb0ELb1ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x14a):
undefined reference to `wrapper_dgemm_'
pca.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb0ELb1ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb0ELb1ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x33c):
undefined reference to `wrapper_dsyrk_'
../src/lib/.libs/libpca.a(utils.o): In function
`stats::utils::compute_column_rms(arma::Mat const&)':
utils.cpp:(.text+0xe95): undefined reference to `wrapper_ddot_'
../src/lib/.libs/libpca.a(utils.o): In function `void
arma::glue_times::apply,
arma::Mat >(arma::Mat&, arma::Mat const&,
arma::Mat const&, double)':
utils.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x353):
undefined reference to `wrapper_dgemm_'
utils.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x8a4):
undefined reference to `wrapper_dgemv_'
utils.cpp:(.text.hot._ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_[_ZN4arma10glue_times5applyIdLb1ELb0ELb0ENS_3MatIdEES3_EEvRNS2_IT_EERKT3_RKT4_S4_]+0x9ab):
undefined reference to `wrapper_dsyrk_'
collect2: error: ld returned 1 exit status
make[2]: *** [unittest] Error 1
make[2]: Leaving directory `/my/dir/libpca-1.3.3/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/my/dir/libpca-1.3.3/test'
make: *** [check-recursive] Error 1
What should I do next?
You need to tell the linker of the location of your armadillo library. You can achieve this in two ways:
Through environment variable: export LIBRARY_PATH=/arma/lib:$LIBRARY_PATH
Passing armadillo include and library path to configure directly:
./configure --with-armadillo-incdir=/arma/include --with-armadillo-libdir=/arma/lib
I would recommend using option 2 as it prevents settings up extra environment variables which may pollute, well, your environment.
Note that --prefix denotes the directory in which libpca is being installed to. This should be different from the source directory!
After configure you can run make, make check, and make install. For make check to succeed the linux library loader needs to know the location of the armadillo shared library. So one option is to run like so: LD_LIBRARY_PATH=/arma/lib make check
To summarize the commands you need to run:
./configure --prefix=/libpca/install --with-armadillo-incdir=/arma/include --with-armadillo-libdir=/arma/lib
make
LD_LIBRARY_PATH=/arma/lib make check
make install
Obviously, you need to adjust the paths to your situation.
Caveat: On some platforms you need to explicitly link with lapack and blas. So if you run into further linker errors then try configuring like this:
LIBS='-llapack -lblas' ./configure --prefix=/libpca/install --with-armadillo-incdir=/arma/include --with-armadillo-libdir=/arma/lib

OCaml Compiler on Windows - compiling module error. (i686-w64-mingw32-as)

I'm using Windows 7 64x and in my next semester, I'll have OCaml as main language in one of my lectures and I am more of a "Windows" person (I have windows version and cygwin-based version). So I decided to go over this tutorial.
Now here's the problem:
I've created files amodule.ml and bmodule.ml as specified in the link. However, when I'm trying to execute following lines on the commandline:
ocamlopt -c amodule.ml
I get following error:
'i686-w64-mingw32-as' is not recognized as an internal or external command, operable program or batch file.
File "amodule.ml", line 1:
Error: Assembler error, input left in file C:\Users\Devate\AppData\Local\Temp\camlasm0d9121.s
And almost the same error comes with bmodule.ml and using the last line:
ocamlopt -o hello amodule.cmx bmodule.cmx
After doing that - I get two new files named amodule.cmi and bmodule.cmi.
However, if I try doing compiling using cygwin version, I get no errors (I get both amodule.cmi and amodule.cmx - same with bmodule).
However with last line in cygwin I get tons of errors:
ocamlopt -o hello amodule.cmx bmodule.cmx
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/std_exit.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/stdlib.a(pervasives.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(ints.o)' is incompatible with
i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(i386.o)' is incompatible with
i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(fail.o)' is incompatible with
i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(io.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(str.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(minor_gc.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(intern.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(compare.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(floats.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(sys.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(extern.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(memory.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(callback.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(startup.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(alloc.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(custom.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(roots.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(signals_asm.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(backtrace.o)' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(printexc.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(signals.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(weak.o)' is incompatible with
i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(gc_ctrl.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(major_gc.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(misc.o)' is incompatible with
i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(finalise.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(md5.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(freelist.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(win32.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(globroots.o)' is incompatible
with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(parsing.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(debugger.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `C:\OCaml\lib/libasmrun.a(compact.o)' is incompatible with i386:x86-64 output
/tmp/camlstartup942177.o:fake:(.text+0x5): undefined reference to `camlPervasives__entry'
/tmp/camlstartup942177.o:fake:(.text+0x5): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `camlPervasives__entry'
/tmp/camlstartup942177.o:fake:(.text+0xc): undefined reference to `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0xc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x1c): undefined reference to `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x1c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x2c): undefined reference to `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x2c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x35): undefined reference to `camlStd_exit__entry'
/tmp/camlstartup942177.o:fake:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `camlStd_exit__entry'
/tmp/camlstartup942177.o:fake:(.text+0x3c): undefined reference to `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x3c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_globals_inited'
/tmp/camlstartup942177.o:fake:(.text+0x5e): undefined reference to `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x5e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x9e): undefined reference to `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0x9e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0xee): undefined reference to `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0xee): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x12e): undefined reference to `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0x12e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0x16e): undefined reference to `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x16e): additional relocation overflows omitted from the output
/tmp/camlstartup942177.o:fake:(.text+0x1a3): undefined reference to `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0x1ee): undefined reference to `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x22e): undefined reference to `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0x26e): undefined reference to `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x2a3): undefined reference to `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.text+0x2de): undefined reference to `caml_young_limit'
/tmp/camlstartup942177.o:fake:(.text+0x313): undefined reference to `caml_call_gc'
/tmp/camlstartup942177.o:fake:(.data+0x2b8): undefined reference to `camlPervasives'
/tmp/camlstartup942177.o:fake:(.data+0x2d0): undefined reference to `camlStd_exit'
/tmp/camlstartup942177.o:fake:(.data+0x3d8): undefined reference to `camlPervasives__data_begin'
/tmp/camlstartup942177.o:fake:(.data+0x3e0): undefined reference to `camlPervasives__data_end'
/tmp/camlstartup942177.o:fake:(.data+0x408): undefined reference to `camlStd_exit__data_begin'
/tmp/camlstartup942177.o:fake:(.data+0x410): undefined reference to `camlStd_exit__data_end'
/tmp/camlstartup942177.o:fake:(.data+0x430): undefined reference to `camlPervasives__code_begin'
/tmp/camlstartup942177.o:fake:(.data+0x438): undefined reference to `camlPervasives__code_end'
/tmp/camlstartup942177.o:fake:(.data+0x460): undefined reference to `camlStd_exit__code_begin'
/tmp/camlstartup942177.o:fake:(.data+0x468): undefined reference to `camlStd_exit__code_end'
/tmp/camlstartup942177.o:fake:(.data+0x480): undefined reference to `caml_system__frametable'
/tmp/camlstartup942177.o:fake:(.data+0x488): undefined reference to `camlPervasives__frametable'
/tmp/camlstartup942177.o:fake:(.data+0x4a0): undefined reference to `camlStd_exit__frametable'
bmodule.o:fake:(.text+0xc): undefined reference to `camlPervasives__print_endline_1257'
amodule.o:fake:(.text+0x8): undefined reference to `camlPervasives__print_endline_1257'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.text+0x1b5): undefined reference to `_caml_exn_End_of_file'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.text+0x493): undefined reference to `_caml_exn_Failure'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.text+0x4d3): undefined reference to `_caml_exn_Invalid_argument'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.text+0xa76): undefined reference to `_caml_exn_End_of_file'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.text+0xb18): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x184): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x194): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x1bc): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x2b0): undefined reference to `_caml_curry4'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x2c0): undefined reference to `_caml_curry4'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x2d0): undefined reference to `_caml_curry4'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x2f8): undefined reference to `_caml_curry3'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x320): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x330): undefined reference to `_caml_curry4'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x340): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x374): undefined reference to `_caml_curry3'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x384): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x3dc): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x404): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x414): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x448): undefined reference to `_caml_curry2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x458): more undefined references to `_caml_curry2' follow
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x524): undefined reference to `_caml_curry3'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7c4): undefined reference to `_fmod'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7cc): undefined reference to `_floor'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7d0): undefined reference to `_ceil'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7d4): undefined reference to `_tanh'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7d8): undefined reference to `_tan'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7dc): undefined reference to `_sqrt'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7e0): undefined reference to `_sinh'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7e4): undefined reference to `_sin'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7ec): undefined reference to `_log10'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7f0): undefined reference to `_log'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7f4): undefined reference to `_cosh'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x7f8): undefined reference to `_cos'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x800): undefined reference to `_atan2'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x804): undefined reference to `_atan'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x808): undefined reference to `_asin'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x80c): undefined reference to `_acos'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x814): undefined reference to `_exp'
C:\OCaml\lib/stdlib.a(pervasives.o):fake:(.data+0x818): undefined reference to `_pow'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x3f9): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x429): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x457): undefined reference to `_atoi'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x560): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x57c): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x86c): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0xa29): undefined reference to `___divdi3'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0xaa6): undefined reference to `___moddi3'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0xde3): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0xe56): undefined reference to `___udivdi3'
C:\OCaml\lib/libasmrun.a(ints.o):ints.c:(.text+0x131a): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(i386.o):fake:(.text+0x119): undefined reference to `_caml_program'
C:\OCaml\lib/libasmrun.a(i386.o):fake:(.text+0x211): undefined reference to `_caml_apply2'
C:\OCaml\lib/libasmrun.a(i386.o):fake:(.text+0x231): undefined reference to `_caml_apply3'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x219): undefined reference to `_caml_exn_Failure'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x230): undefined reference to `_caml_exn_Invalid_argument'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x23f): undefined reference to `_caml_bucket_Out_of_memory'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x24e): undefined reference to `_caml_bucket_Stack_overflow'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x265): undefined reference to `_caml_exn_Sys_error'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x274): undefined reference to `_caml_exn_End_of_file'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x283): undefined reference to `_caml_exn_Division_by_zero'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x292): undefined reference to `_caml_exn_Not_found'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x2a1): undefined reference to `_caml_exn_Sys_blocked_io'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x2d7): undefined reference to `_caml_exn_Invalid_argument'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x326): undefined reference to `_caml_exn_Match_failure'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x32d): undefined reference to `_caml_exn_Assert_failure'
C:\OCaml\lib/libasmrun.a(fail.o):fail.c:(.text+0x334): undefined reference to `_caml_exn_Undefined_recursive_module'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0xbc): undefined reference to `_write'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x149): undefined reference to `__lseeki64'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x1d9): undefined reference to `_close'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x249): undefined reference to `__lseeki64'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x270): undefined reference to `__lseeki64'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x351): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x464): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x47b): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x4b4): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x554): undefined reference to `__lseeki64'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x5c8): undefined reference to `_read'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x5f8): undefined reference to `_read'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x71d): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x73a): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x786): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x882): undefined reference to `__lseeki64'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x90c): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0xafd): undefined reference to `_close'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x1284): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x12aa): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(io.o):io.c:(.text+0x1308): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(str.o):str.c:(.text+0x41d): undefined reference to `_memcmp'
C:\OCaml\lib/libasmrun.a(str.o):str.c:(.text+0x52e): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(str.o):str.c:(.text+0x560): undefined reference to `_memset'
C:\OCaml\lib/libasmrun.a(str.o):str.c:(.text+0x589): undefined reference to `_setlocale'
C:\OCaml\lib/libasmrun.a(str.o):str.c:(.text+0x5a2): undefined reference to `__imp__isprint'
C:\OCaml\lib/libasmrun.a(minor_gc.o):minor_gc.c:(.text+0x56d): undefined reference to `_free'
C:\OCaml\lib/libasmrun.a(minor_gc.o):minor_gc.c:(.text+0x6b7): undefined reference to `_realloc'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x13): undefined reference to `_free'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x241): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x2ce): undefined reference to `_malloc'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x2f9): undefined reference to `_realloc'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x5c3): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x7b7): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x89d): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x9f2): undefined reference to `_memcmp'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x1227): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(intern.o):intern.c:(.text+0x13d7): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(compare.o):compare.c:(.text+0x13): undefined reference to `_free'
C:\OCaml\lib/libasmrun.a(compare.o):compare.c:(.text+0x2a5): undefined reference to `_memcmp'
C:\OCaml\lib/libasmrun.a(compare.o):compare.c:(.text+0x430): undefined reference to `_strcmp'
C:\OCaml\lib/libasmrun.a(compare.o):compare.c:(.text+0x519): undefined reference to `_malloc'
C:\OCaml\lib/libasmrun.a(compare.o):compare.c:(.text+0x548): undefined reference to `_realloc'
C:\OCaml\lib/libasmrun.a(floats.o):floats.c:(.text+0x9f): undefined reference to `_atoi'
C:\OCaml\lib/libasmrun.a(floats.o):floats.c:(.text+0xe1): undefined reference to `_atoi'
C:\OCaml\lib/libasmrun.a(floats.o):floats.c:(.text+0x121): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(floats.o):floats.c:(.text+0x1a6): undefined reference to `_sprintf'
C:\OCaml\lib/libasmrun.a(floats.o):floats.c:(.text+0x267): undefined reference to `___strtod'
C:\OCaml\lib/libasmrun.a(floats.o):floats.c:(.text+0x314): undefined reference to `___strtod'
C:\OCaml\lib/libasmrun.a(weak.o):weak.c:(.text+0x41d): undefined reference to `_memmove'
C:\OCaml\lib/libasmrun.a(major_gc.o):major_gc.c:(.text+0xb8): undefined reference to `_realloc'
C:\OCaml\lib/libasmrun.a(major_gc.o):major_gc.c:(.text+0xb39): undefined reference to `_malloc'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x16f): undefined reference to `_fwrite'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x1bb): undefined reference to `_realloc'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x204): undefined reference to `__imp___findfirst'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x287): undefined reference to `_malloc'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x2a2): undefined reference to `_memcpy'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x2b9): undefined reference to `_strcpy'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x2d1): undefined reference to `__imp___findnext'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x2e3): undefined reference to `__imp___findclose'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x5ae): undefined reference to `_strcpy'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x616): undefined reference to `_strcpy'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x68c): undefined reference to `_flexdll_dlopen'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x6a3): undefined reference to `_flexdll_dump_exports'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x6a8): undefined reference to `__imp___iob'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x6b3): undefined reference to `_fflush'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x6c9): undefined reference to `_flexdll_dlclose'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x73b): undefined reference to `_signal'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x75b): undefined reference to `__imp__SetConsoleCtrlHandler#8'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x7a9): undefined reference to `_malloc'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x863): undefined reference to `_strcpy'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x8bd): undefined reference to `__imp___findfirst'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x93d): undefined reference to `_strcpy'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x961): undefined reference to `__imp___findnext'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x96e): undefined reference to `__imp___findclose'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x98e): undefined reference to `__imp__SetUnhandledExceptionFilter#4'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x9aa): undefined reference to `__imp__GetSystemTimeAsFileTime#4'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x9ba): undefined reference to `__imp__QueryPerformanceCounter#4'
C:\OCaml\lib/libasmrun.a(win32.o):win32.c:(.text+0x9d0): undefined reference to `__imp__GetCurrentProcessId#0'
C:\OCaml\lib/libasmrun.a(parsing.o):parsing.c:(.text+0x4a2): undefined reference to `_fprintf'
C:\OCaml\lib/libasmrun.a(parsing.o):parsing.c:(.text+0x570): undefined reference to `__imp___iob'
C:\OCaml\lib/libasmrun.a(parsing.o):parsing.c:(.text+0x57b): undefined reference to `_fprintf'
C:\OCaml\lib/libasmrun.a(compact.o):compact.c:(.text+0x50d): undefined reference to `_memmove'
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../lib/libcygwin.a(libcmain.o): In function `main':
/usr/src/debug/cygwin-1.7.31-2/winsup/cygwin/lib/libcmain.c:39: undefined reference to `WinMain'
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
And I have no idea what to do.
If you want to learn OCaml, do not use Windows. No matter whether you are a Windows person or not. Period.
With that said, i686-w64-mingw32-as is an assembler and it is missing. You must read OCaml's instruction README.win32 carefully and install required softwares.
For the trouble of Cygwin version, I guess you are trying to link your Cygwin object files with MinGW OCaml installation. This wont work at all. Maybe your Cygwin OCaml is totally confused by the env var for MinGW OCaml.
I repeat. OCaml in Windows has so many pit falls for new leaners. Just avoid it.

Arduino SD library arduino-core 1:1.0.0.1+dfsg-7 undefined reference

I'm trying to compile the DumpFile example on Raspbian using the arduino-core and arduino-mk packages.
It usually worked well for other projects, but when it comes to using the SD library I have errors at compilation time, I don't know if it's something I do wrong or if it's an issue in the SD library itself.
From the changelog of the arduino-core package, there are nothing that was fixed in the SD library between my version of the package and the most recent one. So upgrading may not help.
I'm copying the output of running >make
/usr/bin/avr-gcc -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I.
-I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SD -I/home/pi/sketchbook/libraries/SD -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/libraries/SD/File.cpp -o build-cli/libs/SD/File.o
mkdir -p build-cli/libs/SD/
/usr/bin/avr-gcc -c -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=100 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/usr/share/arduino/libraries/SD -I/home/pi/sketchbook/libraries/SD -g -Os -w -Wall -ffunction-sections -fdata-sections -fno-exceptions /usr/share/arduino/libraries/SD/SD.cpp -o build-cli/libs/SD/SD.o
/usr/bin/avr-ar rcs build-cli/libcore.a build-cli/WInterrupts.o build-cli/wiring_analog.o build-cli/wiring.o build-cli/wiring_digital.o build-cli/wiring_pulse.o build-cli/wiring_shift.o build-cli/CDC.o build-cli/HardwareSerial.o build-cli/HID.o build-cli/IPAddress.o build-cli/main.o build-cli/new.o build-cli/Print.o build-cli/Stream.o build-cli/Tone.o build-cli/USBCore.o build-cli/WMath.o build-cli/WString.o build-cli/libs/SD/File.o build-cli/libs/SD/SD.o
/usr/bin/avr-gcc -mmcu=atmega328p -Wl,--gc-sections -Os -o build-cli/readSd.elf build-cli/readSd.o build-cli/libcore.a -lc -lm
build-cli/libcore.a(File.o): In function `File::operator bool()':
/usr/share/arduino/libraries/SD/File.cpp:146: undefined reference to `SdFile::sync()'
/usr/share/arduino/libraries/SD/File.cpp:148: undefined reference to `SdFile::write(void const*, unsigned int)'
build-cli/libcore.a(File.o): In function `File::operator bool()':
/usr/share/arduino/libraries/SD/utility/SdFat.h:214: undefined reference to `SdFile::read(void*, unsigned int)'
build-cli/libcore.a(File.o): In function `File::operator bool()':
/usr/share/arduino/libraries/SD/File.cpp:149: undefined reference to `SdFile::seekSet(unsigned long)'
build-cli/libcore.a(File.o): In function `File::operator bool()':
/usr/share/arduino/libraries/SD/utility/SdFat.h:214: undefined reference to `SdFile::close()'
build-cli/libcore.a(SD.o): In function `_GLOBAL__sub_I__Z20getNextPathComponentPcPjS_':
/usr/share/arduino/libraries/SD/utility/Sd2Card.h:155: undefined reference to `Sd2Card::init(unsigned char, unsigned char)'
build-cli/libcore.a(SD.o): In function `_GLOBAL__sub_I__Z20getNextPathComponentPcPjS_':
/usr/share/arduino/libraries/SD/utility/SdFat.h:430: undefined reference to `SdVolume::init(Sd2Card*, unsigned char)'
build-cli/libcore.a(SD.o): In function `_GLOBAL__sub_I__Z20getNextPathComponentPcPjS_':
/usr/share/arduino/hardware/arduino/cores/arduino/Print.h:43: undefined reference to `SdFile::openRoot(SdVolume*)'
build-cli/libcore.a(SD.o): In function `_GLOBAL__sub_I__Z20getNextPathComponentPcPjS_':
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdVolume::init(Sd2Card*, unsigned char)'
/usr/share/arduino/libraries/SD/utility/SdFat.h:430: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:430: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::close()'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::open(SdFile*, char const*, unsigned char)'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::close()'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::open(SdFile*, char const*, unsigned char)'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::open(SdFile*, char const*, unsigned char)'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::close()'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `SdFile::seekSet(unsigned long)'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
/usr/share/arduino/libraries/SD/utility/SdFat.h:138: undefined reference to `vtable for SdFile'
collect2: error: ld returned 1 exit status
make: *** [build-cli/readSd.elf] Error 1
Could someone please help me to pinpoint at the issue?
Thanks
Note the SD library has a sub directory containing the functions that are undefined. Perhaps you need to add -I/usr/share/arduino/libraries/SD/utility to your make

Resources