By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1134 - Build issue: TDEEDU FTBFS when linking with --no-undefined
Summary: Build issue: TDEEDU FTBFS when linking with --no-undefined
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdeedu (show other bugs)
Version: 3.5.13 [Trinity]
Hardware: All Linux
: P5 blocker
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2012-08-01 10:48 CDT by Francois Andriot
Modified: 2013-04-10 13:57 CDT (History)
5 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
kdeedu 3.5.13.2 : log file FTBFS under Mageia 2 (243.64 KB, application/x-xz)
2013-04-07 17:09 CDT, Francois Andriot
Details
kdeedu 3.5.13.2 : generated Makefiles on mageia2 (496.84 KB, application/x-xz)
2013-04-07 17:19 CDT, Francois Andriot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Andriot 2012-08-01 10:48:23 CDT
Hello, when building RPM packages on Mageia 2, by defaults, there is a "--no-undefined" flag in LDFLAGS variable.

Then, TDEEDU fails to link in 'kvoctrain' with the following output:

$ make
Making all in kvt-xml
make[1] : on entre dans le répertoire « /home/albator/rpmbuild/BUILD/BUILD.mga2.x86_64/kdeedu/kvoctrain/kvoctrain/kvt-core/kvt-xml »
make[1]: Rien à faire pour « all ».
make[1] : on quitte le répertoire « /home/albator/rpmbuild/BUILD/BUILD.mga2.x86_64/kdeedu/kvoctrain/kvoctrain/kvt-core/kvt-xml »
make[1] : on entre dans le répertoire « /home/albator/rpmbuild/BUILD/BUILD.mga2.x86_64/kdeedu/kvoctrain/kvoctrain/kvt-core »
/bin/sh ../../../libtool --tag=CXX   --mode=link x86_64-mageia-linux-gnu-g++  -DNDEBUG -DNO_DEBUG -O2 -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fno-exceptions -fno-check-new -fno-common -I/opt/trinity/include/tqt -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -I.. -L/opt/trinity/lib64 -I/opt/trinity/include -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -o libkvoctraincore.la -rpath /opt/trinity/lib64 libkvoctraincore_la.all_cpp.lo  kvt-xml/libkvtxml.la ../common-dialogs/libcommondlg.la -lqt-mt  -lz -lpng -lz -lm -lXext -lX11  -lSM -lICE -ltqt -lpthread -L/usr/lib64 -ltqt -lkdecore -lkio -lkdeui -lDCOP 
libtool: link: x86_64-mageia-linux-gnu-g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../lib64/crti.o /usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/crtbeginS.o  .libs/libkvoctraincore_la.all_cpp.o  -Wl,--whole-archive kvt-xml/.libs/libkvtxml.a ../common-dialogs/.libs/libcommondlg.a -Wl,--no-whole-archive  -O2 -O2 -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags    -L/opt/trinity/lib64 /usr/lib64/libqt-mt.so -L/usr/lib64 -lmng -ljpeg -lpng12 -lXrender -lXrandr -lXcursor -lXinerama -lXft -lfreetype -lfontconfig -lpng -lz /usr/lib64/libXext.so /usr/lib64/libX11.so /usr/lib64/libxcb.so -ldl -lSM -lICE -lpthread /opt/trinity/lib64/libtqt.so /opt/trinity/lib64/libkdecore.so /opt/trinity/lib64/libkio.so /opt/trinity/lib64/libkdeui.so /opt/trinity/lib64/libDCOP.so -L/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3 -L/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/crtendS.o /usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/../../../../lib64/crtn.o -Wl,-soname -Wl,libkvoctraincore.so.0 -o .libs/libkvoctraincore.so.0.0.0
.libs/libkvoctraincore_la.all_cpp.o: In function `kvoctrainDoc::saveToCsv(QTextStream&, QString&)':
/home/albator/rpmbuild/BUILD/BUILD.mga2.x86_64/kdeedu/kvoctrain/kvoctrain/kvt-core/kvd_csv.cpp:73: undefined reference to `kvoctrainApp::getCsvOrder(kvoctrainDoc*)'
collect2: ld returned 1 exit status
make[1]: *** [libkvoctraincore.la] Erreur 1
make[1] : on quitte le répertoire « /home/albator/rpmbuild/BUILD/BUILD.mga2.x86_64/kdeedu/kvoctrain/kvoctrain/kvt-core »
make: *** [all-recursive] Erreur 1


As a workaround, I build without the "--no-undefined" option.
Comment 1 Timothy Pearson 2013-04-06 17:02:30 CDT
I cannot reproduce this bug when building from GIT with the no-undefined flag set.  Can you confirm that this is still an issue?

Thanks!
Comment 2 Darrell 2013-04-07 13:38:19 CDT
Francois, is this still an issue? :)
Comment 3 Francois Andriot 2013-04-07 14:32:47 CDT
Yes, problem still exists, no change at all.
Comment 4 Timothy Pearson 2013-04-07 16:27:57 CDT
(In reply to comment #3)
> Yes, problem still exists, no change at all.

Can you give detailed instructions on how to reproduce the issue?  I have tried several times to force no-undefined, and can in fact see the -no-undefined flag in the compiler/linker commands, but I cannot reproduce this bug.
Comment 5 Francois Andriot 2013-04-07 17:09:12 CDT
Created attachment 1139 [details]
kdeedu 3.5.13.2 : log file FTBFS under Mageia 2

First, here is the complete log file of FTBFS.
There you can find my CXXFLAGS and ./configure command, among others.
Comment 6 Francois Andriot 2013-04-07 17:19:58 CDT
Created attachment 1140 [details]
kdeedu 3.5.13.2 : generated Makefiles on mageia2

And here are the generated Makefiles under Mageia 2, in case you find something useful in there.
(I suspect something is wrong with autotools here, since it is working on other distribution without problems, only Mageia 2 has problem)
Comment 7 Timothy Pearson 2013-04-07 18:10:25 CDT
OK, I see the problem in kvoctrain.  Essentially, the original developer tried to avoid duplication of code (method getCsvOrder), but that is only possible if undefined symbols are allowed during build.  I have copied that method into the kvoctrain core library, which allows kvoctrain to build as far as I can tell.

This has been pushed to GIT in hash c5dacf5.  Please let me know if tdeedu now builds on Magia, as I have no way to test a full build on that platform here.
Comment 8 Francois Andriot 2013-04-08 03:20:49 CDT
Nice find, it is working now, FTBFS has gone on Mageia 2.
Comment 9 Darrell 2013-04-09 21:02:06 CDT
I don't know why this does not fail on Mageia2, but tdeedu FTBFS for me on Slackware 14:

kvd_csv.cpp:66:9: error: '::find' has not been declared

The code was added in commit c5dacf57 2013-04-07.
Comment 10 Slávek Banko 2013-04-09 21:06:38 CDT
(Odpověď na komentář #9)
> I don't know why this does not fail on Mageia2, but tdeedu FTBFS for me on
> Slackware 14:
> 
> kvd_csv.cpp:66:9: error: '::find' has not been declared
> 
> The code was added in commit c5dacf57 2013-04-07.

Added in c5dacf57, but removed in subsequent 2e1267ad.
Please, try it with latest GIT == 2e1267ad.
Comment 11 Darrell 2013-04-09 21:14:25 CDT
I have GIT == 2e1267ad. I updated my GIT repo this afternoon, which includes the gwenview patches too.
Comment 12 Darrell 2013-04-09 21:31:05 CDT
I don't think my local repo is updating correctly. Using git log -p I see the patch from 2e1267ad but the sources of kvd_csv.cpp still has the ::find code. How do I force my local repo to update?
Comment 13 Darrell 2013-04-09 21:56:15 CDT
Then again perhaps my local repo is fine. My copy of kvd_csv.cpp is the same as upstream:

http://git.trinitydesktop.org/cgit/tdeedu/plain/kvoctrain/kvoctrain/kvt-core/kvd_csv.cpp

Notice upstream has ::find as well. What gives?
Comment 14 Darrell 2013-04-09 21:59:04 CDT
I see the confusion. The removal of ::find in commit 2e1267ad was for file kva_clip.cpp. My fail error was in kvd_csv.cpp.

So the failure still stands and I can't build tdeedu.
Comment 15 Timothy Pearson 2013-04-10 13:07:18 CDT
(In reply to comment #14)
> I see the confusion. The removal of ::find in commit 2e1267ad was for file
> kva_clip.cpp. My fail error was in kvd_csv.cpp.
> 
> So the failure still stands and I can't build tdeedu.

Try adding this line to the #include block of kvd_csv.h, under #include <vector>:
#include <algorithm>

If that works go ahead and commit it to GIT.
Comment 16 Darrell 2013-04-10 13:57:47 CDT
> Try adding this line to the #include block of kvd_csv.h, under #include <vector>:
> #include <algorithm>

> If that works go ahead and commit it to GIT.

Patch pushed to GIT in commit d4ee0601.