I've got code that is some what compiler dependent and I'd like to run the unit test written in gtest in qemu. I've found this tutorial that explains how to do it for arm-linux-gnueabihf all though it doesn't work any more I've made a docker container with a working version that I will show below. but when I try to compile a c++ hello world arm-none-eabi-g++ has undefiened references.
Dockerfile:
FROM ubuntu:20.04
RUN apt-get update -y --fix-missing
RUN DEBIAN_FRONTEND='noninteractive' apt-get install -y \
libc6-armel-cross \
libc6-dev-armel-cross \
binutils-arm-linux-gnueabi \
libncurses5-dev \
build-essential \
bison \
flex \
libssl-dev \
bc \
gcc-arm-linux-gnueabihf \
g++-arm-linux-gnueabihf \
qemu \
qemu-user-static \
qemu-system-arm
RUN apt-get install -y gcc-arm-none-eabi
RUN apt-get install -y binutils-arm-none-eabi
RUN apt-get install -y libnewlib-arm-none-eabi
RUN apt-get install -y libnewlib-nano-arm-none-eabi
RUN apt-get install -y libstdc++-arm-none-eabi-newlib
ADD ./helloArm.cpp /
helloArm.cpp:
#include <iostream>
int main()
{
std::cout << "Hello Arm!" << std::endl;
}
To build and start the container make a folder and copy Dockerfile and helloArm.cpp.
Then goto the folder in the command line and run:
docker build -t arm-test .
docker run -it arm-test
This will bring up a bash prompt there you will have all the tools I've installed so far.
What I'd like is that arm-none-eabi will work the same as arm-linux-gnueabihf to run helloArm run the commands below in the docker container.
arm-linux-gnueabihf-g++ -o helloArm helloArm.cpp
qemu-arm-static -L /usr/arm-linux-gnueabihf/ helloArm
Now when I try to build helloArm for arm-none-eabi with the command below
arm-none-eabi-g++ -o helloArm helloArm.cpp
I get these linking errors:
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libstdc++.a(cxx11-ios_failure.o): in function `(anonymous namespace)::__io_category_instance()':
/build/libstdc++-arm-none-eabi-7zwPZl/libstdc++-arm-none-eabi-12build2/build/libstdc++/src/c++11/../../../../src/libstdc++-v3/src/c++11/cxx11-ios_failure.cc:73: undefined reference to `__sync_synchronize'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libstdc++.a(locale.o): in function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
/build/libstdc++-arm-none-eabi-7zwPZl/libstdc++-arm-none-eabi-12build2/build/libstdc++/src/c++98/../../../../src/libstdc++-v3/src/c++98/locale.cc:36: undefined reference to `__sync_synchronize'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libstdc++.a(locale_init.o): in function `(anonymous namespace)::get_locale_mutex()':
/build/libstdc++-arm-none-eabi-7zwPZl/libstdc++-arm-none-eabi-12build2/build/libstdc++/src/c++98/../../../../src/libstdc++-v3/src/c++98/locale_init.cc:66: undefined reference to `__sync_synchronize'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): in function `abort':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/abort.c:59: undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/stdlib/../../../../../newlib/libc/stdlib/exit.c:64: undefined reference to `_exit'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): in function `_fstat_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/fstatr.c:55: undefined reference to `_fstat'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): in function `_open_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/openr.c:50: undefined reference to `_open'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function `_sbrk_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/sbrkr.c:51: undefined reference to `_sbrk'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_kill_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:53: undefined reference to `_kill'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function `_getpid_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/signalr.c:83: undefined reference to `_getpid'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): in function `_write_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/writer.c:49: undefined reference to `_write'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): in function `_close_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/closer.c:47: undefined reference to `_close'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): in function `_isatty_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/isattyr.c:52: undefined reference to `_isatty'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): in function `_lseek_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/lseekr.c:49: undefined reference to `_lseek'
/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): in function `_read_r':
/build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/newlib/libc/reent/../../../../../newlib/libc/reent/readr.c:49: undefined reference to `_read'
collect2: error: ld returned 1 exit status
I would guess that some library is missing or I forgot a flag.
I haven't been able to test if qemu works with arm-none-eabi but I think the syntax should be something like this
qemu-arm-static -L /usr/lib/arm-none-eabi/ helloArm
Related
I was following the guide in https://github.com/vim/vim/blob/master/src/INSTALLpc.txt
(Section 2 - Msys2 with MinGW)
I've installed msys2 and ran it through the mingw64 file in the msys64 directory, installed all dependencies, etc. I got until 2.4
2.4.
I navigated to the SRC folder of the vim 8.1 installation and ran the command, but I got this error when I run make -f Make_ming.mak GUI=no
$ make -f Make_ming.mak
g++ -I. -Iproto - ..[omitted].. -luuid
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/buffer.o:buffer.c:(.text+0xf01): undefined reference to `python3_buffer_free'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/eval.o:eval.c:(.text+0xea4): undefined reference to `set_ref_in_python3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/evalfunc.o:evalfunc.c:(.text+0x4505): undefined reference to `python3_enabled'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/evalfunc.o:evalfunc.c:(.text+0x6990): undefined reference to `do_py3eval'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/evalfunc.o:evalfunc.c:(.text+0x7bd2): undefined reference to `do_py3eval'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_cmds2.o:ex_cmds2.c:(.text+0x277d): undefined reference to `ex_py3file'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_cmds2.o:ex_cmds2.c:(.text+0x2891): undefined reference to `ex_py3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_cmds2.o:ex_cmds2.c:(.text+0x28a1): undefined reference to `ex_py3do'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x4fa8): undefined reference to `ex_py3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x4fc8): undefined reference to `ex_py3do'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x4fe8): undefined reference to `ex_py3'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/ex_docmd.o:ex_docmd.c:(.rdata+0x5008): undefined reference to `ex_py3file'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/main.o:main.c:(.text+0x2785): undefined reference to `python3_end'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/window.o:window.c:(.text+0x569a): undefined reference to `python3_window_free'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gobjx86-64/window.o:window.c:(.text+0x6117): undefined reference to `python3_tabpage_free'
collect2.exe: error: ld returned 1 exit status
make: *** [Make_cyg_ming.mak:1042: gvim.exe] Error 1
I am slowly losing my mind, I've spent 3 days trying to get this to compile. I've also tried approaches with windows-native mingw32 (chocolatey), tried cross-compiling from WSL ubuntu, compiling inside of msys2 instead of mingw64 terminal.. The purpose of this is to eventually compile a specific version of vim (8.1) with a specific version of python (3.7).
Here is what is installed on my msys:
$ pacman -Qqe
base
base-devel
filesystem
mingw-w64-x86_64-binutils
mingw-w64-x86_64-crt-git
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-ada
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-gcc-libgfortran
mingw-w64-x86_64-gcc-libs
mingw-w64-x86_64-gcc-objc
mingw-w64-x86_64-gdb
mingw-w64-x86_64-gdb-multiarch
mingw-w64-x86_64-headers-git
mingw-w64-x86_64-libgccjit
mingw-w64-x86_64-libmangle-git
mingw-w64-x86_64-libwinpthread-git
mingw-w64-x86_64-make
mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-tools-git
mingw-w64-x86_64-winpthreads-git
mingw-w64-x86_64-winstorecompat-git
msys2-runtime
and the locations/versions of my compilers
C:\tools\msys64\mingw64\bin\mingw32-make.exe
C:\tools\msys64\mingw64\bin\gcc.exe
C:\tools\msys64\mingw64\bin\g++.exe
I most often refuse to request help unless I am extremely desperate and out of options, so I apologize if this question was written poorly or difficult to understand.
It seems that in Python 3.9, _Py_DEC_REFTOTAL was removed completely without any substitute. Thread (redhat.com). It will not build certain versions of vim. I installed Python3.6 through chocolatey, and everything compiled and linked perfectly.
For future reference, first install a version of python3 that works
(choco install python --version=3.6.7)
then use this in mingw64 shell in src folder of vim:
> mingw32-make -f Make_ming.mak PYTHON3=C:/Python36
PYTHON3_HOME=C:/Python36 PYTHON3INC=-IC:/Python36/include DYNAMIC_PYTHON3=yes
PYTHON3_VER=36 DYNAMIC_PYTHON3_DLL=libpython36.dll
STATIC_STDCPLUS=yes
My problem happens to be with FFmpeg but I suspect that this would happen with almost any C library.
Problem Description
My app uses FFmpeg that is compiled with NDK r10e. I am trying to update everything to NDK r17, while also switching to clang, since Google prefers us to use that over gcc.
My first step is to just build FFmpeg.
To that end, I have used the make_standalone_toolchain.py script to create a stand-alone toolchain for the x86 architecture, like so:
make_standalone_toolchain.py --arch x86 --api 21 --install-dir ~/Development/ndk-toolchains/x86
Then I configure the FFmpeg build as follows:
TOOLCHAIN_DIR=~/Development/ndk-toolchains/x86
./configure \
--prefix=$(pwd)/android/x86 \
--cross-prefix=$TOOLCHAIN_DIR/bin/i686-linux-android- \
--target-os=android \
--arch=x86 \
--enable-cross-compile \
--disable-asm \
--toolchain=clang-usan \
--disable-stripping \
--extra-cflags="-m32" \
--sysroot=$TOOLCHAIN_DIR/sysroot/
And then I build it as follows:
make clean
make -j4
make install
Everything seems to compile fine, but I get several linker errors that all say the same thing:
undefined reference to '__mulodi4'
Solutions I've tried
1. Linking against libclang_rt.builtins*
I found a few places around the Web which suggested that this is caused by the fact that libgcc doesn't provide __mulodi4. A github user named sitsofe was nice enough to post a work-around here. However, I am sure where to find this libclang_rt.builtins-i686.a library. Here is what I was able to find in my standalone toolchain directory:
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-x86_64.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-i386.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-aarch64-android.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-mips64-android.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-x86_64-android.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-i686-android.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-arm-android.a
./lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-mips-android.a
The libclang_rt.builtins-i686-android.a library looks close but (I think) no cigar. When I try to link to it, I get the same error:
undefined reference to '__mulodi4'
Here is my new FFmpeg build config command:
./configure \
--prefix=$(pwd)/android/x86 \
--cross-prefix=$TOOLCHAIN_DIR/bin/i686-linux-android- \
--target-os=android \
--arch=x86 \
--enable-cross-compile \
--disable-asm \
--toolchain=clang-usan \
--disable-stripping \
--extra-cflags="-m32" \
--extra-ldflags="-L${TOOLCHAIN_DIR}/lib64/clang/6.0.2/lib/linux/libclang_rt.builtins-i686-android.a" \
--sysroot=$TOOLCHAIN_DIR/sysroot/
I checked with -v to make sure that this line was added to the linker flags, and it was. However, I have no idea if this library should even be expected to work, let alone whether I'm adding it to the linker flags correctly. In any case, what I'm doing here doesn't work.
2. Switching to a different sanitizer
Instead of using the undefined sanitizer, I tried switching to the address sanitizer. This is (frankly) a total stab in the dark, based on a vague mention of asan being available in r17 at Google I/O this week.
In this case, FFmpeg builds just fine!
However, when I try to pull FFmpeg into my test project (a simple AAR w/ C++ support, that just has one jni method that calls av_gettime(), I get a ton of linker errors:
Error:error: undefined reference to '__asan_option_detect_stack_use_after_return'
Error:error: undefined reference to '__asan_stack_malloc_0'
Error:error: undefined reference to '__asan_report_load4'
Error:error: undefined reference to '__asan_report_load4'
Error:error: undefined reference to '__asan_shadow_memory_dynamic_address'
Error:error: undefined reference to '__asan_option_detect_stack_use_after_return'
Error:error: undefined reference to '__asan_stack_malloc_0'
Error:error: undefined reference to '__asan_report_load4'
Error:error: undefined reference to '__asan_report_load4'
Error:error: undefined reference to '__asan_shadow_memory_dynamic_address'
Error:error: undefined reference to '__asan_option_detect_stack_use_after_return'
Error:error: undefined reference to '__asan_stack_malloc_0'
Error:error: undefined reference to '__asan_report_store4'
Error:error: undefined reference to '__asan_report_store4'
Error:error: undefined reference to '__asan_init'
Error:error: undefined reference to '__asan_version_mismatch_check_v9'
So it seems to find the FFmpeg library just fine, indicating that that part of my CMake file is correct, but it can't locate any of these asan references.
This seems to be a common problem that people are running into, but I can't see to find a work-around that actually works for me.
The short answer: update to NDK r17.
This is referred to in a handful of NDK bugs:
https://github.com/android-ndk/ndk/issues/184
https://github.com/android-ndk/ndk/issues/294 (the root cause, not the same symptom)
https://github.com/android-ndk/ndk/issues/506
Essentially Clang was generating calls that libgcc doesn't implement. I say was rather than is because this doesn't seem to be the case any more for NDK r17 for this specific function.
In the event that you're still hitting this and I just wasn't able to with any of the earlier test cases, you can try linking with -lcompiler_rt-extras. This is included as of NDK r17 and has the missing functions.
I am trying to install HTK using Cygwin (32 bit) on a x86_64 computer build. This is part of the error I get when running
./configure
make all
gcc = 5.4.0, g++ = 5.4.0, perl = 5; I have X11 folder in C:/cygwin/usr/share
Let me know if I should post the entire error of the make file.
HSLab.c: In function ‘FileExists’:
HSLab.c:1209:12: warning: variable ‘isEXF’ set but not used [-Wunused-but-set-variable]
Boolean isEXF; /* File name is extended */
^
/tmp/ccZO1TK3.o: In function InitBar':
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:344: undefined reference toHTextWidth'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:348: undefined reference to HSetColour'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:349: undefined reference toHTextHeight'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:349: undefined reference to HPrintf'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:350: undefined reference toHSetGrey'
/cygdrive/c/users/stevenha29/My Documents/htk/HTKTools/HSLab.c:351: undefined reference to `HFillRectangle'
Run
./configure --without-x --disable-hslab
to disable Xlib and HSLab
Overall, Cygwin is a bad idea, it is better to use Linux, you can install it in Virtualbox.
I m trying to install Aqua3d "obinet.engr.uconn.edu/wiki/index.php/Aqua-3D_dev_manual`", for which I need to first make the file provided with the package, When I try to do so by using the command on terminal:
$ make -f Makefile.txt
I am getting the following output:
g++ wx-config --libs --cxxflags --gl-libs -lglut -lGLU -lGL -o aqua3d Aqua3D.o ControlPanel.o EnvironmentPanel.o FileChooser.o InformationPanel.o MainFrame.o PlaybackPanel.o PreferenceWindow.o ViewFileHandler.o NodeAttributeDialog.o Event.o AnnotationEvent.o DequeueEvent.o DropEvent.o EnqueueEvent.o HopEvent.o HopSignal.o NodeEvent.o ReceiveEvent.o WorldEvent.o DataManager.o Environment.o EventManager.o Node.o Parser.o vmath.o trackball.o
Aqua3D.o: In function Aqua3D::OnInit()':
Aqua3D.cpp:(.text+0x35): undefined reference towxStandardPathsBase::Get()'
Aqua3D.cpp:(.text+0x7a): undefined reference to wxString::Bef>
.
.
.
Parser.cpp:(.text+0x1e4d): undefined reference towxLogError(wchar_t const*, ...)'
collect2: error: ld returned 1 exit status
make: * [aqua3d] Error 1**
Kindly guide me how to resolve this problem?
FYI, I've already installed freeglut3-dev, libwxgtk2.8-dev, libgtk2.0-dev.
Aqua3d can be compiled with g++-4.4 : sudo apt-get install g++-4.4
Example, edited Makefile https://drive.google.com/file/d/0B7S255p3kFXNWC13UXZFZHJ6OUU/view?usp=sharing
I'm currently trying to compile suricata (http://suricata-ids.org/) with luajit support on my arch linux distribution with these commands:
./configure --enable-luajit --with-libpcap-includes=/usr/local/pfring/include \
--with-libpcap-libraries=/usr/local/pfring/lib --with-libnss-libraries=/usr/lib \
--with-libnss-includes=/usr/include/nss/ --with-libnspr-libraries=/usr/lib \
--with-libnspr-includes=/usr/include/nspr \
--with-libluajit-includes=/usr/local/include/luajit-2.0/ \
--with-libluajit-libraries=/usr/lib/
then:
make
but I get the following errors when I make the project:
detect-luajit.o: In function `LuaDumpStack':
detect-luajit.c:(.text+0x46e): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitMatchBuffer':
detect-luajit.c:(.text+0x5d6): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0x6b9): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0x7d5): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitMatch':
detect-luajit.c:(.text+0xaac): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0xde4): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0xf00): undefined reference to `lua_tonumberx'
detect-luajit.o: In function `DetectLuajitThreadInit':
detect-luajit.c:(.text+0x1864): undefined reference to `lua_pcallk'
detect-luajit.o: In function `DetectLuaSetupPrime':
detect-luajit.c:(.text+0x1fe7): undefined reference to `lua_pcallk'
detect-luajit.c:(.text+0x2167): undefined reference to `lua_getglobal'
detect-luajit.c:(.text+0x24bf): undefined reference to `lua_pcallk'
collect2: error: ld returned 1 exit status
make[2]: *** [suricata] Error 1
I first though it was an issue coming from the lua version. So I tried to install both the lua 5.1.5 and 5.2.2, remaking the library and symbolic links as well, and nothing worked.
Thanks for your help
In Debian and Ubuntu, the library files are installed into /usr/lib/x86_64-linux-gnu/. If arch does the same, your configure line should include: --with-libluajit-libraries=/usr/lib/x86_64-linux-gnu/