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 2628

Summary: Build issue: FTBFS on libr because missing link to libdl
Product: TDE Reporter: Francois Andriot <albator78>
Component: non-core programsAssignee: Francois Andriot <albator78>
Status: RESOLVED FIXED    
Severity: normal CC: albator78, bugwatch, slavek.banko
Priority: P5    
Version: R14.0.1 [Trinity]   
Hardware: amd64   
OS: Linux   
Compiler Version: TDE Version String:
Application Version: Application Name:
Bug Depends on:    
Bug Blocks: 2247    
Attachments: libr: fix linking to dl library
libr: fix linking to iberty library

Description Francois Andriot 2016-04-13 15:10:00 CDT
Building libr on Mageia 5 gives FTBFS:

Linking C static library libr.a
cd "/dev/shm/BUILD.mga5.x86_64/trinity-libr-14.1.0~pre16+a08f1e95/build/src" && /usr/bin/cmake -P CMakeFiles/r-static.dir/cmake_clean_target.cmake
cd "/dev/shm/BUILD.mga5.x86_64/trinity-libr-14.1.0~pre16+a08f1e95/build/src" && /usr/bin/cmake -E cmake_link_script CMakeFiles/r-static.dir/link.txt --verbose=1
/usr/bin/ar cr libr.a  CMakeFiles/r-static.dir/libr-bfd.c.o CMakeFiles/r-static.dir/tempfiles.c.o CMakeFiles/r-static.dir/onecanvas.c.o CMakeFiles/r-static.dir/libr-icons.c.o CMakeFiles/r-static.dir/libr-i18n.c.o CMakeFiles/r-static.dir/libr-gtk.c.o CMakeFiles/r-static.dir/libr.c.o
/usr/bin/ranlib libr.a
make[2]: Leaving directory '/dev/shm/BUILD.mga5.x86_64/trinity-libr-14.1.0~pre16+a08f1e95/build'
/usr/bin/cmake -E cmake_progress_report "/dev/shm/BUILD.mga5.x86_64/trinity-libr-14.1.0~pre16+a08f1e95/build/CMakeFiles"  9 10 11 12 13 14 15
[100%] Built target r-static
/usr/lib64/libbfd.a(plugin.o): In function `try_load_plugin':
/home/iurt/rpmbuild/BUILD/binutils-2.24/objs/bfd/../../bfd/plugin.c:306: undefined reference to `dlopen'
/home/iurt/rpmbuild/BUILD/binutils-2.24/objs/bfd/../../bfd/plugin.c:313: undefined reference to `dlsym'
/home/iurt/rpmbuild/BUILD/binutils-2.24/objs/bfd/../../bfd/plugin.c:309: undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
Comment 1 Francois Andriot 2016-04-13 15:10:48 CDT
Created attachment 2645 [details]
libr: fix linking to dl library

Quick patch to allow linking to dl library.
Comment 2 Slávek Banko 2016-04-13 18:04:54 CDT
With small change pushed to GIT in hash 09255fac.
Comment 3 Francois Andriot 2016-04-17 06:32:30 CDT
Created attachment 2646 [details]
libr: fix linking to iberty library
Comment 4 Francois Andriot 2016-04-17 06:33:06 CDT
New FTBFS on opensuse because "-lbfd" requires "-liberty"...
See patch above.
Comment 5 Slávek Banko 2016-04-17 13:32:46 CDT
It is interesting that on any Debian or Ubuntu library bfd not requires iberty library. However, the patch was pushed.
Comment 6 Slávek Banko 2016-10-09 11:43:11 CDT
Pushed to GIT in hash 0e682a62.