Created attachment 896538 [details] Patch Description of problem: When the shared libraries are created, the LDFLAGS are not passed. The shared libraries end up containing symbols of libraries against which they are not linked. Tentative patch attached. Patch is somewhat hacky, but the main goal was to have the LDFLAGS after the source files when producing the shared libraries. $ readelf -Ws libscotch.so | grep BZ2 31: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzReadClose 34: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzWriteOpen 51: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzWriteClose 52: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzWrite 59: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzReadGetUnused 73: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzReadOpen 78: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND BZ2_bzRead $ readelf -Ws libscotch.so | grep lzmadec 41: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND lzmadec_close 49: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND lzmadec_dopen 81: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND lzmadec_read $ readelf -Ws libscotch.so | grep pthr 2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_detach 14: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_barrier_init 53: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_exit.5 (3) 64: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_barrier_wait 66: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_join 67: 0000000000000000 0 FUNC GLOBAL DEFAULT UND pthread_self.5 (3) 68: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_create 70: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND pthread_barrier_destroy $ ldd libscotch.so linux-vdso.so.1 => (0x00007fff27dfe000) libc.so.6 => /lib64/libc.so.6 (0x00007f77855c4000) /lib64/ld-linux-x86-64.so.2 (0x00007f7785c4c000) ***** With patch ***** $ ldd libscotch.so linux-vdso.so.1 => (0x00007fff6dd8e000) libz.so.1 => /lib64/libz.so.1 (0x00007f1c7e832000) libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f1c7e622000) liblzmadec.so.0 => /lib64/liblzmadec.so.0 (0x00007f1c7e41d000) libm.so.6 => /lib64/libm.so.6 (0x00007f1c7e115000) librt.so.1 => /lib64/librt.so.1 (0x00007f1c7df0d000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1c7dcf0000) libc.so.6 => /lib64/libc.so.6 (0x00007f1c7d92a000) /lib64/ld-linux-x86-64.so.2 (0x00007f1c7ed0a000) Version-Release number of selected component (if applicable): scotch-6.0.0-5.fc21.x86_64
Ping?
Any news here?
See [1]: the package should get orphaned hopefully in the coming days. As soon as that is the case, I'll take over scotch and apply the patch, so that we can move forward. [1] https://fedorahosted.org/fesco/ticket/1315#comment:4
I'm not a maintainer, so unfortunately I cannot help you update the package. Have you got in touch with the owner of scotch about this issue, or is this specific to changes made to the Makefiles in the fedora rpm patches? Your patch defines DYNLDFLAGS, but I can't find where that is used in the scotch Makefiles.
In the proposed patch, I add a scotch_ldflags.patch which adds the DYNLDFLAGS to the calls which create the shared libraries, i.e. - $(AR) $(ARFLAGS) $(@) $(?) + $(AR) $(ARFLAGS) $(@) $(?) $(DYNLDFLAGS) Note that $(AR) here is misleading, since are is actually gcc when compiling a shared library, i.e. look at scotch-Makefile.shared.inc.in: [...] AR = gcc [...] So the issue is sort of between fedora and upstream. upstream provides handwritten, not terribly flexible makefiles, and the fedora packages hack those makefiles to make it produce a shared library.
Ok I remember that issue. Other things to check while you're at it: - You may need to update the Requires fields in the .spec file. - Scotch 6.0 should have removed the dependency of scotch on the mpi libraries. I think the .spec file was updated last year but worth checking.
Simple Patch Request ==================== Patch[master]=http://smani.fedorapeople.org/patches/scotch_underlinked-libraries.patch ScratchBuild[master]=http://koji.fedoraproject.org/koji/taskinfo?taskID=7109043 Submitter=smani
http://koji.fedoraproject.org/koji/taskinfo?taskID=7109125 All ok?
Awesome, thanks!