Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
QCA linking failure
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ELo
n00b
n00b


Joined: 19 Mar 2006
Posts: 3

PostPosted: Sun Mar 19, 2006 5:19 am    Post subject: QCA linking failure Reply with quote

Configuring Qt Cryptographic Architecture (QCA) ...
Verifying Qt 3.x Multithreaded (MT) build environment ... ok

Good, your configure finished. Now run 'make'.

g++ -c -pipe -Wall -W -march=k8 -O2 -pipe -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -march=k8 -O2 -pipe -fweb -ftracer -frename-registers -fvisibility-inlines-hidden -I/usr/qt/3/mkspecs/linux-g++ -I/var/tmp/portage/qca-1.0-r2/work/qca-1.0 -Isrc -I/usr/qt/3/include -I.ui/ -I.moc/ -o .obj/qca.o src/qca.cpp
/usr/qt/3/bin/moc src/qca.h -o .moc/moc_qca.cpp
g++ -c -pipe -Wall -W -march=k8 -O2 -pipe -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT -march=k8 -O2 -pipe -fweb -ftracer -frename-registers -fvisibility-inlines-hidden -I/usr/qt/3/mkspecs/linux-g++ -I/var/tmp/portage/qca-1.0-r2/work/qca-1.0 -Isrc -I/usr/qt/3/include -I.ui/ -I.moc/ -o .obj/moc_qca.o .moc/moc_qca.cpp
rm -f libqca.so.1.0.0 libqca.so libqca.so.1 libqca.so.1.0
g++ -o libqca.so.1.0.0 .obj/qca.o .obj/moc_qca.o -L/usr/qt/3/lib64 -lqt-mt -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/crt1.o: In function `_start':
init.c:(.text+0x21): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [libqca.so.1.0.0] Error 1

Help. How do I fix this error?
Back to top
View user's profile Send private message
gentoome
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2005
Posts: 78

PostPosted: Wed Apr 26, 2006 9:16 pm    Post subject: Reply with quote

Same problem here. Might come from the LDFLAGS, since it's a linker problem. Could you post yours ?
Back to top
View user's profile Send private message
ELo
n00b
n00b


Joined: 19 Mar 2006
Posts: 3

PostPosted: Wed Apr 26, 2006 9:24 pm    Post subject: Reply with quote

CFLAGS="-march=k8 -O2 -pipe -fweb -ftracer -frename-registers"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--strip-all"

Hope this helps.
Back to top
View user's profile Send private message
gentoome
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jul 2005
Posts: 78

PostPosted: Wed Apr 26, 2006 11:05 pm    Post subject: Reply with quote

Ok, solved it.

I tried to compile it myself and it worked, so the problem had to come from the ebuild. I found the following workaround :

Original ebuild :

Code:
src_compile() {
        ./configure --prefix=/usr || die "configure failed"
       sed -i \
               -e "/^CFLAGS/s:$: ${CFLAGS}:" \
               -e "/^CXXFLAGS/s:$: ${CXXFLAGS}:" \
               -e "/-strip/d" \
               Makefile
        emake || die "emake failed"
}


I am not very good at sed, but this is doing something to the CFLAGS and CXXFLAGS, since we have a linker problem :

Code:
src_compile() {
        ./configure --prefix=/usr || die "configure failed"
#       sed -i \
#               -e "/^CFLAGS/s:$: ${CFLAGS}:" \
#               -e "/^CXXFLAGS/s:$: ${CXXFLAGS}:" \
#               -e "/-strip/d" \
#               Makefile
        emake || die "emake failed"
}


Then,

Code:
ebuild qca-1.0-r2.ebuild digest


It worked !

Drop me a line if it worked for you.

-- Jonathan
Back to top
View user's profile Send private message
ELo
n00b
n00b


Joined: 19 Mar 2006
Posts: 3

PostPosted: Wed Apr 26, 2006 11:35 pm    Post subject: Reply with quote

Cool.

It worked.

Thanks alot. Now I can start playing with KDE.
Back to top
View user's profile Send private message
Loibisch
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2006
Posts: 89

PostPosted: Sat Feb 09, 2008 2:23 pm    Post subject: Reply with quote

Note: just stumbled over this post and this also works perfectly fine with qca-1.0-r3

Thanks :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum