View previous topic :: View next topic |
Author |
Message |
ELo n00b
Joined: 19 Mar 2006 Posts: 3
|
Posted: Sun Mar 19, 2006 5:19 am Post subject: QCA linking failure |
|
|
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 |
|
|
gentoome Tux's lil' helper
Joined: 18 Jul 2005 Posts: 78
|
Posted: Wed Apr 26, 2006 9:16 pm Post subject: |
|
|
Same problem here. Might come from the LDFLAGS, since it's a linker problem. Could you post yours ? |
|
Back to top |
|
|
ELo n00b
Joined: 19 Mar 2006 Posts: 3
|
Posted: Wed Apr 26, 2006 9:24 pm Post subject: |
|
|
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 |
|
|
gentoome Tux's lil' helper
Joined: 18 Jul 2005 Posts: 78
|
Posted: Wed Apr 26, 2006 11:05 pm Post subject: |
|
|
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 |
|
|
ELo n00b
Joined: 19 Mar 2006 Posts: 3
|
Posted: Wed Apr 26, 2006 11:35 pm Post subject: |
|
|
Cool.
It worked.
Thanks alot. Now I can start playing with KDE. |
|
Back to top |
|
|
Loibisch Tux's lil' helper
Joined: 03 Jan 2006 Posts: 89
|
Posted: Sat Feb 09, 2008 2:23 pm Post subject: |
|
|
Note: just stumbled over this post and this also works perfectly fine with qca-1.0-r3
Thanks |
|
Back to top |
|
|
|