AaronZhangL / unimrcp

Automatically exported from code.google.com/p/unimrcp
Apache License 2.0
0 stars 0 forks source link

compilation problem #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hello,
on latest linux distro gcc has a different way of compiling:

http://docs.fedoraproject.org/en-US/Fedora/13/html/Release_Notes/sect-Release_No
tes-The_GCC_Compiler_Collection.html

however this problem rise while trying to compile unimrcp, either using 
libraries provided by distro or the one provided by your page.

n.b. i'm using UniMRCP Release 1.0.0 r1725 for linux, i wasn't able to find 
newer 

here's a snippet of the error, let me know if you need more information

gcc -DPACKAGE_NAME=\"unimrcp\" -DPACKAGE_TARNAME=\"unimrcp\" 
-DPACKAGE_VERSION=\"1.0.0\" -DPACKAGE_STRING=\"unimrcp\ 1.0.0\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"unimrcp\" 
-DVERSION=\"1.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 
-DLT_OBJDIR=\".libs/\" -I. -Iinclude 
-I../../platforms/libunimrcp-server/include -I../../libs/mrcp-server/include 
-I../../libs/mrcp-engine/include -I../../libs/mrcp-signaling/include 
-I../../libs/mrcpv2-transport/include -I../../libs/mrcp/include 
-I../../libs/mrcp/message/include -I../../libs/mrcp/control/include 
-I../../libs/mrcp/resources/include -I../../libs/mpf/include 
-I../../libs/apr-toolkit/include -I/usr/local/apr/include/apr-1  
-I/usr/local/apr/include/apr-1   -D_REENTRANT -D_GNU_SOURCE  -g -O2  -g -O2 
-pthread -MT uni_daemon.o -MD -MP -MF .deps/uni_daemon.Tpo -c -o uni_daemon.o 
`test -f 'src/uni_daemon.c' || echo './'`src/uni_daemon.c
mv -f .deps/uni_daemon.Tpo .deps/uni_daemon.Po
/bin/bash ../../libtool --tag=CC   --mode=link gcc  -g -O2  -g -O2 -pthread   
-o unimrcpserver main.o uni_cmdline.o uni_daemon.o 
../../platforms/libunimrcp-server/libunimrcpserver.la 
libtool: link: gcc -g -O2 -g -O2 -pthread -o .libs/unimrcpserver main.o 
uni_cmdline.o uni_daemon.o  
../../platforms/libunimrcp-server/.libs/libunimrcpserver.so -pthread -Wl,-rpath 
-Wl,/usr/local/unimrcp/lib
/usr/bin/ld: main.o: undefined reference to symbol 'apr_getopt_long'
/usr/bin/ld: note: 'apr_getopt_long' is defined in DSO 
/usr/local/apr/lib/libapr-1.so.0 so try adding it to the linker command line
/usr/local/apr/lib/libapr-1.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Original issue reported on code.google.com by samuele....@gmail.com on 12 Jun 2012 at 12:00

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Samuele,

I suppose this can occur if there is a different APR library version installed 
on the system than you need, for example 32 vs 64 bit. Moreover, UniMRCP uses 
patched version with thread-safe memory pools.

I do not know where exactly the problem is but you can use following workaround:

make distclean  # just to be sure
./configure                               \
    --with-apr=/path/to/apr           \
    --with-apr-util=/path/to/apr-util \
    LDFLAGS="-L/path/to/apr/lib       \
             -L/path/to/apr-util/lib" \
    LIBS="-lapr-1 -laprutil-1"

# For example:
./configure                                  \
    --with-apr=`pwd`/libs/apr            \
    --with-apr-util=`pwd`/libs/apr-util  \
    LDFLAGS="-L`pwd`/libs/apr/lib        \
             -L`pwd`/libs/apr-util/lib"  \
    LIBS="-lapr-1 -laprutil-1"

Cheers,
- Vali

PS. Sorry for deleting the original comment and re-posting, there were some 
typos.

Original comment by tomas.valenta@speechtech.cz on 29 Jun 2012 at 12:01

GoogleCodeExporter commented 9 years ago
The suggested ./configure options should have helped resolve the problem, I 
guess. Closing the issue.

Original comment by achalo...@gmail.com on 6 Mar 2013 at 8:34