I am using this tutorial to create a cross-compiler.
I followed the gcc cross-compiler tutorial and went to the porting newlib. Everything worked fine till I tried compiling it by issuing
make all install
when I got the following error:
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
and the compilation stops.
I am using Ubuntu 11.10.
I have tried:
using different gcc, binutils and newlib versions (about 5 different combinations)
installing Texinfo
correcting makeinfo path
My cross-compiler works perfectly without the newlib just that it of course cannot include the libraries.
Even if you have makeinfo installed, it may not recognize newer versions. The following patch works. Copy below and save as "configure.patch", save it where the configure script is, then type "patch -p1 < configure.patch".
--- newlib-1.14.0-bak/configure 2008-06-10 20:49:16.918036351 +0200
+++ newlib-1.14.0/configure 2008-06-10 21:21:35.750035824 +0200
## -3542,7 +3542,7 ##
# For an installed makeinfo, we require it to be from texinfo 4.2 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.([2-9]|[1-9][0-9])|[5-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"
I was trying to install 6809 GDB and got this error. I fixed by going into Makefile and changing
MAKEINFO = /opt/binutils-gdb/missing makeinfo
to
MAKEINFO = makeinfo
I also had to do this with
BISON = bison
YACC = bison -y
FLEX = flex
LEX = flex
However make got stuck with some bison function definitions:
macroexp.o: In function `get_character_constant':
/opt/vectrex/binutils-gdb/gdb/macroexp.c:364: undefined reference to `c_parse_escape'
c-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x148): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x150): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x268): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x270): undefined reference to `c_error'
c-lang.o:(.data.rel.ro+0x388): undefined reference to `c_parse'
c-lang.o:(.data.rel.ro+0x390): undefined reference to `c_error'
d-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
d-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
f-lang.o:(.data.rel.ro+0x28): undefined reference to `f_parse'
f-lang.o:(.data.rel.ro+0x30): undefined reference to `f_error'
objc-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
objc-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
go-lang.o:(.data.rel.ro+0x28): undefined reference to `go_parse'
go-lang.o:(.data.rel.ro+0x30): undefined reference to `go_error'
m2-lang.o:(.data.rel.ro+0x28): undefined reference to `m2_parse'
m2-lang.o:(.data.rel.ro+0x30): undefined reference to `m2_error'
opencl-lang.o:(.data.rel.ro+0x28): undefined reference to `c_parse'
opencl-lang.o:(.data.rel.ro+0x30): undefined reference to `c_error'
p-lang.o:(.data.rel.ro+0x28): undefined reference to `pascal_parse'
p-lang.o:(.data.rel.ro+0x30): undefined reference to `pascal_error'
cp-support.o: In function `mangled_name_to_comp':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:644: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:629: undefined reference to `cp_new_demangle_parse_info'
cp-support.o: In function `cp_canonicalize_string_full':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:534: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:541: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:545: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `inspect_type':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:260: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:264: undefined reference to `cp_merge_demangle_parse_infos'
cp-support.o: In function `replace_typedefs':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:441: undefined reference to `cp_comp_to_string'
cp-support.o: In function `replace_typedefs_qualified_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:368: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:343: undefined reference to `cp_comp_to_string'
cp-support.o: In function `cp_canonicalize_string':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:582: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:587: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:588: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_class_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:743: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:738: undefined reference to `cp_comp_to_string'
cp-support.o: In function `method_name_from_physname':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:826: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:830: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_func_name':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:847: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:855: undefined reference to `cp_comp_to_string'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:857: undefined reference to `cp_demangled_name_parse_free'
cp-support.o: In function `cp_remove_params':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:876: undefined reference to `cp_demangled_name_to_comp'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:903: undefined reference to `cp_demangled_name_parse_free'
/opt/vectrex/binutils-gdb/gdb/cp-support.c:901: undefined reference to `cp_comp_to_string'
cp-support.o: In function `do_demangled_name_parse_free_cleanup':
/opt/vectrex/binutils-gdb/gdb/cp-support.c:108: undefined reference to `cp_demangled_name_parse_free'
collect2: error: ld returned 1 exit status
Makefile:1174: recipe for target 'gdb' failed
make[2]: *** [gdb] Error 1
make[2]: Leaving directory '/opt/vectrex/binutils-gdb/gdb'
Makefile:8590: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/opt/vectrex/binutils-gdb'
Makefile:827: recipe for target 'all' failed
make: *** [all] Error 2
After removing the entire directory and redownloading, the makefile was all correct (no missing directory) and make and make install completed fully. So perhaps the modifications to the makefile weren't needed and I just needed to have bison, flex, and makeinfo installed.
Related
I want to configure ffmpeg with libsrt (Secure Reliable Transport) protocol on linux-Ubuntu OS, I followed the steps from this link
But when run $./configure --enable-libsrt command it gives me an error:
ERROR: srt >= 1.3.0 not found using pkg-config
I modified the configuration file, it executed the above command but when i run $ make command it end up with the following errors:
LD ffmpeg_g
libavformat/libavformat.so: undefined reference to `srt_socket'
libavformat/libavformat.so: undefined reference to `srt_bind'
libavformat/libavformat.so: undefined reference to `srt_getsockopt'
libavformat/libavformat.so: undefined reference to `srt_close'
libavformat/libavformat.so: undefined reference to `srt_epoll_add_usock'
libavformat/libavformat.so: undefined reference to `srt_startup'
libavformat/libavformat.so: undefined reference to `srt_connect'
libavformat/libavformat.so: undefined reference to `srt_epoll_release'
libavformat/libavformat.so: undefined reference to `srt_listen'
libavformat/libavformat.so: undefined reference to `srt_getlasterror'
libavformat/libavformat.so: undefined reference to `srt_getlasterror_str'
libavformat/libavformat.so: undefined reference to `srt_cleanup'
libavformat/libavformat.so: undefined reference to `srt_setsockopt'
libavformat/libavformat.so: undefined reference to `srt_sendmsg'
libavformat/libavformat.so: undefined reference to `srt_clearlasterror'
libavformat/libavformat.so: undefined reference to `srt_epoll_wait'
libavformat/libavformat.so: undefined reference to `srt_epoll_remove_usock'
libavformat/libavformat.so: undefined reference to `srt_epoll_create'
libavformat/libavformat.so: undefined reference to `srt_recvmsg'
libavformat/libavformat.so: undefined reference to `srt_accept'
collect2: error: ld returned 1 exit status
Makefile:108: recipe for target 'ffmpeg_g' failed
make: *** [ffmpeg_g] Error 1
What are exact steps to enable libsrt with ffmpeg ? Am i missing anything ? Is there any patch i have to add to existing ffmpeg source ?
Thanks in advance !!!
The answer you referred to assumes the question asker was following the Ubuntu compile guide on the FFmpeg Wiki (because they claimed to be doing so). The compile guide "installs" external libraries into ~/ffmpeg_build for a variety of reasons. The libsrt instructions in that answer does the same to fit with the wiki article. Therefore, it is expected that you will use the additional compilation options as shown in the wiki to deal with this when compiling ffmpeg.
Undo whatever changes you made to configure.
Follow the linked answer and compile libsrt if you haven't already.
Now compile ffmpeg.
make distclean
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --enable-libsrt --pkg-config-flags="--static"
Alternatively, if you don't want to have to use most of those extra options then omit -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" when compiling libsrt.
I'm trying to add the Chilkat C/C++ libraries into a project in CodeBlocks (32-bit, version 12.11) for Windows 7.
So I went to http://www.chilkatsoft.com/downloads_mingw.asp, and downloaded the 32-bit MinGW library.
Then in CodeBlocks I did:
Settings>Compiler>Linker Settings>Add>C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a
Settings>Compiler>Search Directories>Compiler>Add>C:\chilkat-9.5.0-mingw32\include
Settings>Compiler>Search Directories>Linker>Add>C:\chilkat-9.5.0-mingw32
Project>Build Options...>Project Root>Linker Settings>Add>C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a
Project>Build Options...>Project Root>Search Directory>Compiler>Add>C:\chilkat-9.5.0-mingw32\include
Project>Build Options...>Project Root>Search Directory>Linker>Add>C:\chilkat-9.5.0-mingw32
Then I set my compiler to GNU GCC Compiler.
Finally, I encounter these two issues:
When I do #include<...> and press Ctrl+Space inside the brackets, there are no suggestions for anything related to the Chilkat library. See first code block below for full code (pretty simple).
While the program builds successfully with CkMailMan.h included, it breaks when I instantiate CkMailMan, with the errors shown in the second code block below.
I suspect it has to do with the library extension being ".a," which is for Linux. But I get the same problem when I do a Visual Basic version of this library (extensions .dll) and use the Microsoft Visual C++ 2010 compiler. Any ideas?
Code:
#include <iostream>
#include <CkMailMan.h>
using namespace std;
CkMailMan mailman;
int main()
{
cout << "Hello world!" << endl;
return 0;
}
Error messages in Build Log when running code:
-------------- Build: Debug in TimeButler (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -fexceptions -g -IC:\chilkat-9.5.0-x86-vc10\include -IC:\chilkat-9.5.0-mingw32\include -IC:\chilkat-9.5.0-mingw32\include -c C:\TimeButler\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LC:\chilkat-9.5.0-x86-vc10\libs -LC:\chilkat-9.5.0-mingw32 -LC:\chilkat-9.5.0-mingw32 -o bin\Debug\TimeButler.exe obj\Debug\main.o C:\chilkat-9.5.0-x86-vc10\libs\ChilkatDbg.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatDbgDll.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatRel.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatRelDll.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatDbg.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatDbgDll.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatRel.lib C:\chilkat-9.5.0-x86-vc10\libs\ChilkatRelDll.lib C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.text+0x51): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.text+0x14a): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.text+0x395): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.text+0x4cf): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.text+0x5d7): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.text+0x6df): more undefined references to `_Unwind_Resume' follow
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMailMan.o):CkMailMan.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.text+0x15a): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.text+0x247): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.text+0x30b): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.text+0x35b): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.text+0x805): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.text+0x9c8): more undefined references to `_Unwind_Resume' follow
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsBase.o):ClsBase.cpp:(.eh_frame+0x173): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMultiByteBase.o):CkMultiByteBase.cpp:(.text+0x6a): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMultiByteBase.o):CkMultiByteBase.cpp:(.text+0x522): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMultiByteBase.o):CkMultiByteBase.cpp:(.text+0x666): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkMultiByteBase.o):CkMultiByteBase.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.text+0xa5): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.text+0x151): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.text+0x3fd): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.text+0x587): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.text+0x8af): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.text+0xbd3): more undefined references to `_Unwind_Resume' follow
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsMailMan.o):ClsMailMan.cpp:(.eh_frame+0x3f): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.text+0x117): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.text+0x253): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.text+0x3bf): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.text+0x5ff): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.text+0x806): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.text+0x88b): more undefined references to `_Unwind_Resume' follow
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(_clsTcp.o):_clsTcp.cpp:(.eh_frame+0xcb): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.text+0x5b): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.text+0xd6): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.text+0x142): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.text+0x3dd): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.text+0x451): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.text+0x4e2): more undefined references to `_Unwind_Resume' follow
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(CkString.o):CkString.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.text+0xd3): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.text+0x163): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.text+0x21b): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.text+0x862): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.text+0xfd9): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.text+0xff3): more undefined references to `_Unwind_Resume' follow
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(XString.o):XString.cpp:(.eh_frame+0x13): undefined reference to `__gxx_personality_v0'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsHttpProxyClient.o):ClsHttpProxyClient.cpp:(.text+0xaf): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsHttpProxyClient.o):ClsHttpProxyClient.cpp:(.text+0x15f): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsHttpProxyClient.o):ClsHttpProxyClient.cpp:(.text+0x482): undefined reference to `_Unwind_Resume'
C:\chilkat-9.5.0-mingw32\libchilkat-9.5.0.a(ClsHttpProxyClient.o):ClsHttpProxyClient.cpp:(.text+0x733): undefined reference to `_Unwind_Resume'
Process terminated with status 1 (0 minutes, 10 seconds)
50 errors, 0 warnings (0 minutes, 10 seconds)
Turns out I needed to switch to the visual Studio C++ compiler and download the library in that compiler's format. I was right about not being able to use '.a' extension libraries.
I have installed Harbour 1.0.1 on MSOS 6.22
I am using djgpp. When I tried to build exe it gves following errors
C:\HB101\TEST>BLD TESTPRG
c:/djgpp/lib/crt0.o:crt0.s:(.data+0xc2): undefined reference to `main'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x129): undefined reference to `hb_vmProcessSymbolsEx'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x14b): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x168): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x185): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1a2): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1bf): undefined reference to `hb_vmExecute'
c:/djgpp/tmp/ccpmwnoY.o:TESTPRG.c:(.text+0x1dc): more undefined references to `hb_vmExecute' follow
c:/djgpp/bin/ld.exe: c:/djgpp/tmp/ccpmwnoY.o: bad reloc address 0x0 in section `.data'
c:/djgpp/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
I have got all required lib files, Then Why it is giving this error ?
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/
My apologies if this is a duplicate question. I have inherited a project that contains ZipRuby as one of the required Gems. My local development environment is Windows 7. My ruby is 1.9.3p194. I have Rails 3.2.6. I have installed the RubyDevKit version 452.
All the other necessary gems either install or natively complile with no errors on Windows 7 but the ZipRuby gem. I have never built a gem from scratch. The gem starts to compile and gets the following errors.
`enter code here` linking shared-object zipruby.so
tmpfile.o: In function `zipruby_tmpnam':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/tmpfile.c:56: undefined reference to `strcpy_s'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/tmpfile.c:62: undefined reference to `_sopen_s'
zipruby_archive.o: In function `zipruby_archive_read':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zipruby_archive.c:1447: undefined reference to `fopen_s'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zipruby_archive.c:1471: undefined reference to `_fclose_nolock'
zip_close.o: In function `add_data':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_close.c:293: undefined reference to `ftello'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_close.c:312: undefined reference to `ftello'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_close.c:314: undefined reference to `fseeko'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_close.c:328: undefined reference to `fseeko'
zip_close.o: In function `zip_close':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_close.c:188: undefined reference to `ftello'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_close.c:153: undefined reference to `fseeko'
zip_crypt.o: In function `zip_crypt':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_crypt.c:293: undefined reference to `ftello'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_crypt.c:265: undefined reference to `fseeko'
zip_dirent.o: In function `zip_cdir_write':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_dirent.c:109: undefined reference to `ftello'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_dirent.c:116: undefined reference to `ftello'
zip_file_get_offset.o: In function `zip_file_get_offset':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_file_get_offset.c:64: undefined reference to `fseeko'
zip_fopen_index.o: In function `zip_file_fillbuf':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_fopen_index.c:155: undefined reference to `fseeko'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_fopen_index.c:155: undefined reference to `fseeko'
zip_open.o: In function `zip_checkcons':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_open.c:282: undefined reference to `fseeko'
zip_open.o: In function `zip_open':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_open.c:84: undefined reference to `fseeko'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_open.c:85: undefined reference to `ftello'
zip_open.o: In function `zip_find_central_dir':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_open.c:436: undefined reference to `fseeko'
zip_open.o: In function `zip_readcdir':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_open.c:217: undefined reference to `fseeko'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_open.c:220: undefined reference to `ftello'
zip_source_filep.o: In function `read_file':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\zipruby-0.3.6\ext/zip_source_filep.c:105: undefined reference to `fseeko'
collect2: ld returned 1 exit status make: *** [zipruby.so] Error 1
It is clear that references to one or more library files are not being resolved. I am not sure where to go with this next. Has anyone been successful in using zipruby with a mingw installation of ruby on Windows 7?
Some additional information I missed above. To get this far, I had to install the windows development version of GnuWin32. So the build command for the gem is: Gem install ZipRuby -- --with-opt-dir=Path.to.GnuWin32.folder. This folder must have a lib and bin folder in it with source code. I will update the question more if I learn more and post a solution if I figure out anything before I get an answer from anywhere else.
try gem install zipruby --version "= 0.3.6" --platform=mswin32
It worked for me.