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

undefined symbol: VSwrite + Vsetname #3

Open
eserte opened this issue Apr 22, 2019 · 11 comments

Comments

Projects
None yet
4 participants
@eserte
Copy link

commented Apr 22, 2019

The test suite fails on RedHat-like systems (that is: centos6, centos7, and fedora28). On centos6 it looks like this:

Can't load '/home/cpansand/.cpan/build/2019042109/PDLA-IO-HDF-2.019100-0/blib/arch/auto/PDLA/IO/HDF/VS/VS.so' for module PDLA::IO::HDF::VS: /home/cpansand/.cpan/build/2019042109/PDLA-IO-HDF-2.019100-0/blib/arch/auto/PDLA/IO/HDF/VS/VS.so: undefined symbol: Vsetname at /opt/perl-5.22.3/lib/5.22.3/x86_64-linux/DynaLoader.pm line 193.

On centos7 and fedora28 it's:

Can't load '/home/cpansand/.cpan/build/2019042107/PDLA-IO-HDF-2.019100-4/blib/arch/auto/PDLA/IO/HDF/VS/VS.so' for module PDLA::IO::HDF::VS: /home/cpansand/.cpan/build/2019042107/PDLA-IO-HDF-2.019100-4/blib/arch/auto/PDLA/IO/HDF/VS/VS.so: undefined symbol: VSwrite at /opt/perl-5.28.1/lib/5.28.1/x86_64-linux/DynaLoader.pm line 193, <DATA> line 207.
@mohawk2

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

Hi Slaven, thanks! I don't have access to such a system. If you do, could you ask its package manager (yum?) what HDF library it's got? Also, could you tell me the results of this?

perl -MAlien::HDF4 -MTest::More -e 'die explain(Alien::HDF4->Inline("C"))'
@eserte

This comment has been minimized.

Copy link
Author

commented Apr 22, 2019

The hdf versions:

hdf-4.2.13-1.el6.x86_64
hdf-4.2.13-1.el7.x86_64
hdf-4.2.13-8.fc28.x86_64

C/linker flags (on the centos6 system, but fedora28 looks the same):

$ perl5.28.0 -MAlien::HDF4 -MTest::More -e 'die explain(Alien::HDF4->Inline("C"))'
{
  'INC' => '-DSWAP -DNDEBUG -DHDF -DBIG_LONGS -DIA64 -D_BSD_SOURCE -DLINUX -DGCC32 "-I/usr/include/hdf"',
  'LIBS' => '"-L/usr/lib64/hdf" -lmfhdf -ldf -ljpeg -lz ',
  'TYPEMAPS' => []
}
@mohawk2

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

Thanks, I'll look into it!

@mohawk2

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

@sebastic I know you're the Debian rather than Centos person for HDF, but do you have any insights? I seem to have 4.2.13 on my Ubuntu (according to the changelog) and that works fine?

@sebastic

This comment has been minimized.

Copy link

commented Apr 22, 2019

Might be some issue specific to the RPM build, according to the changelog in the spec file shared libraries were only introduced in 4.2.14-3, the Debian package had those for much longer.

objdump -x <path/to/library.a> should be able to confirm if the symbols are present in the static library.

Maybe @opoplawski can share his insights, as he seems to be the maintainer of the hdf package in Fedora.

@mohawk2

This comment has been minimized.

Copy link
Member

commented Apr 22, 2019

It's annoying because using the HDF static library would actually be even slightly better in building the Perl XS SO.

@opoplawski

This comment has been minimized.

Copy link

commented Apr 23, 2019

I don't have any insight other than the obvious that it appears that VS.so is not getting properly linked, though the link flags appear to be correct.

@mohawk2

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

@sagitter Do you have any insights? The Centos 6 and 7 hdf-devel packages don't even have .so files, so I'm assuming that's not the problem.

@eserte Could I ask you to run:

objdump -x /usr/lib64/hdf/libdf.a /usr/lib64/hdf/libmfhdf.a|grep Vsetname
@eserte

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

On the Fedora28 VM:

$ objdump -x /usr/lib64/hdf/libdf.a /usr/lib64/hdf/libmfhdf.a|grep Vsetname
0000000000000000         *UND*  0000000000000000 Vsetname
00000000000034cf R_X86_64_PLT32    Vsetname-0x0000000000000004
000000000000386d R_X86_64_PLT32    Vsetname-0x0000000000000004
0000000000003390 g     F .text  0000000000000215 Vsetname
0000000000000000         *UND*  0000000000000000 Vsetname
0000000000000248 R_X86_64_PLT32    Vsetname-0x0000000000000004
0000000000000000         *UND*  0000000000000000 Vsetname
0000000000000196 R_X86_64_PLT32    Vsetname-0x0000000000000004
$ objdump -x /usr/lib64/hdf/libdf.a /usr/lib64/hdf/libmfhdf.a|grep VSwrite 
0000000000000000         *UND*  0000000000000000 VSwrite
0000000000000b16 R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000000000         *UND*  0000000000000000 VSwrite
000000000000085c R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000006ef3 R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000000000         *UND*  0000000000000000 VSwrite
00000000000006a8 R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000001fbb R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000000000         *UND*  0000000000000000 VSwrite
0000000000000073 R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000000bd0 g     F .text  0000000000000975 VSwrite
0000000000000000         *UND*  0000000000000000 VSwrite
000000000000087b R_X86_64_PLT32    VSwrite-0x0000000000000004
000000000000088b R_X86_64_PLT32    VSwrite-0x0000000000000004
000000000000089b R_X86_64_PLT32    VSwrite-0x0000000000000004
0000000000000000         *UND*  0000000000000000 VSwrite
0000000000002ac5 R_X86_64_PLT32    VSwrite-0x0000000000000004
@mohawk2

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

Thanks! Sorry I didn't think to ask before, but could you do same exercise on the created VS.so and SD.so on the same machine?

@eserte

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

This time on the CentOS7 VM:

$ objdump -x ./blib/arch/auto/PDLA/IO/HDF/VS/VS.so | grep VSwrite 
0000000000002d90 l     F .text  00000000000001fb              XS_PDLA__IO__HDF__VS__VSwrite
0000000000000000         *UND*  0000000000000000              VSwrite
$ objdump -x ./blib/arch/auto/PDLA/IO/HDF/SD/SD.so | grep SDfileinfo
0000000000006f10 l     F .text  000000000000025f              XS_PDLA__IO__HDF__SD__SDfileinfo
0000000000000000         *UND*  0000000000000000              SDfileinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.