Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

punc is empty #70

Open
drew-parsons opened this issue May 29, 2022 · 0 comments
Open

punc is empty #70

drew-parsons opened this issue May 29, 2022 · 0 comments

Comments

@drew-parsons
Copy link

I'm preparing a build of APBS 3.4.1 using FETK 1.9.3, building with the new shared library options to build against system shared libraries (libsuperlu.so etc).

The build seems to be successful, but there is something strange about the punc entry. Building components as shared libraries libmc.so, libpunc.so etc), ldd reports link status like this:

$ ldd  /usr/lib/x86_64-linux-gnu/libmc.so
	linux-vdso.so.1 (0x00007ffce8181000)
	libumfpack.so.5 => /usr/lib/x86_64-linux-gnu/libumfpack.so.5 (0x00007f1c1424a000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1c14229000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1c140e5000)
	libmaloc.so.1 => /usr/lib/x86_64-linux-gnu/libmaloc.so.1 (0x00007f1c1405f000)
	libsuperlu.so.5 => /usr/lib/x86_64-linux-gnu/libsuperlu.so.5 (0x00007f1c13feb000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1c13e12000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1c15e26000)
	libamd.so.2 => /usr/lib/x86_64-linux-gnu/libamd.so.2 (0x00007f1c13e05000)
	libsuitesparseconfig.so.5 => /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so.5 (0x00007f1c13e00000)
	libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007f1c13d9f000)
	libcholmod.so.3 => /usr/lib/x86_64-linux-gnu/libcholmod.so.3 (0x00007f1c13cbe000)
	libreadline.so.8 => /lib/x86_64-linux-gnu/libreadline.so.8 (0x00007f1c13c67000)
	libopenblas.so.0 => /usr/lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007f1c11828000)
	libcolamd.so.2 => /usr/lib/x86_64-linux-gnu/libcolamd.so.2 (0x00007f1c1181f000)
	libccolamd.so.2 => /usr/lib/x86_64-linux-gnu/libccolamd.so.2 (0x00007f1c11812000)
	libcamd.so.2 => /usr/lib/x86_64-linux-gnu/libcamd.so.2 (0x00007f1c11806000)
	libmetis.so.5 => /usr/lib/x86_64-linux-gnu/libmetis.so.5 (0x00007f1c11797000)
	liblapack.so.3 => /usr/lib/x86_64-linux-gnu/liblapack.so.3 (0x00007f1c110d3000)
	libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f1c11089000)
	libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f1c11057000)
	libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f1c10d8c000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1c10d86000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f1c10d3f000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1c10d1d000)

while

$ ldd /usr/lib/x86_64-linux-gnu/libpunc.so 
	statically linked

So libmc.so is confirmed as a shared library, while libpunc.so is indicated as static. But the build conditions for both components are essentially the same.

libpunc.so links only to punc_base.c.o (apart from libvf2c.so, libcgcode.so and external libraries). Inspecting the source in punc/src/base, there's only the dummy function punc_link(). In base/punc/punc.h, vf2c, vcgcode.h, vpmg.h are mentioned, but explicitly not used, with a hard coded if in place:

#if 0
#include <punc/vf2c.h>
#endif

So it looks as if punc is not actually doing anything. It's an empty component. The symbols list for libpunc.so is just

$ nm -D /usr/lib/x86_64-linux-gnu/libpunc.so 
                 w __cxa_finalize
                 w __gmon_start__
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
0000000000001100 T punc_link

indicating only the dummy function punc_link.

In terms of the ldd reponse, I can reproduce the "statically linked" message with a trivial library linked only to external libraries, with no actual object file:

$/usr/bin/gcc -shared -Wl,-soname,libtest.so -o libtest.so  -lsuperlu
$ ldd libtest.so
	statically linked

So it looks like ldd reports libpunc.so as "statically linked" since punc is effectively empty. Is this intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant