libHYPRE.so is not linked to other libHYPRE* libs

Bug #1192613 reported by Alexander Lelyakin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hypre (Debian)
Fix Released
Unknown
hypre (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I have ubuntu-13.04, 64bit

libhypre-dev package, version 2.8.0b-1

shared library /usr/lib/libHYPRE.so is not linked to other HYPRE libraries:

$ ldd /usr/lib/libHYPRE.so
 linux-vdso.so.1 => (0x00007fff55dfe000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f41b8003000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f41b85ec000)

As a result a test program test_hypre.c
-------
#include <HYPRE.h>

int main(){
HYPRE_IJMatrixCreate();
return 0
}

compiled with:
gcc test_hypre.c -lHYPRE

compilation failed with message:
/tmp/ccvHPJmL.o: In function `main':
test_hypre.c:(.text+0xa): undefined reference to `HYPRE_IJMatrixCreate'
collect2: error: ld returned 1 exit status

Of course if I specify specific library -lHYPRE_IJ_mv than compilation is successful.
But -lHYPRE do not work at all as it has no symbols defined.

Revision history for this message
Alexander Lelyakin (alexander-lelyakin) wrote :

Hello. Is there ANY maintainer for this package?
I suggest to include following linker script (with name /usr/lib/libHYPRE.so)
instead of completely unusable file /usr/lib/libHYPRE-2.8.08.so
====== libHYPRE.so
GROUP(
libHYPRE_sstruct_ls.so
libHYPRE_sstruct_mv.so
libHYPRE_DistributedMatrixPilutSolver.so
libHYPRE_DistributedMatrix.so
libHYPRE_Euclid.so
libHYPRE_FEI_fgmres.so
libHYPRE_FEI.so
libHYPRE_IJ_mv.so
libHYPRE_krylov.so
libHYPRE_MatrixMatrix.so
libHYPRE_mli.so
libHYPRE_multivector.so
libHYPRE_ParaSails.so
libHYPRE_parcsr_block_mv.so
libHYPRE_parcsr_ls.so
libHYPRE_parcsr_mv.so
libHYPRE_seq_mv.so
libHYPRE_struct_ls.so
libHYPRE_struct_mv.so
libHYPRE_utilities.so
);
===================
Such linker script will allow to link user programs with just one option -lHYPRE and
do not link a program with unnecessary shared libraries.

Revision history for this message
Alexander Lelyakin (alexander-lelyakin) wrote :

One more: As far as I have understand starting with some gcc version
gcc uses "--as-needed" option when calling linker.
As a result following line from file hypre-2.8.0b/debian/patches/shlibs-interlink.patch:
===========
+ ${BUILD_CC_SHARED} -o ${SONAME} ${LIBS_HYPRE} ${SOLIBS} ${SHARED_SET_SONAME}${SONAME} ${SHARED_OPTIONS}
===========
create just empty library.

This line can be corrected by placing "-Wl,--no-as-needed" in it. For example:
=============
+ ${BUILD_CC_SHARED} -o ${SONAME} -Wl,--no-as-needed ${LIBS_HYPRE} ${SOLIBS} ${SHARED_SET_SONAME}${SONAME} ${SHARED_OPTIONS}
============
However I think that previous solution with linker script is much more convenient.

Now the question is: do anybody read all these comments at all?

Revision history for this message
Luke D'Alessandro (ldalessa) wrote :

I'm still seeing this today. Manual linker script is an adequate workaround but an annoying step.

Revision history for this message
Drew Parsons (dparsons) wrote :

Hi Alexander, Luke, as you have noticed there is no specific Ubuntu maintainer for HYPRE. The package is rebuilt directly from the underlying Debian version. Debian has a separate workflow from Ubuntu, and a separate bug tracking system. This situation is the same for most packages in the Ubuntu universe archive, the packages fully managed by Ubuntu are the ones in Ubuntu main.

Your problem was reported in Debian bug#902102, and will be fixed in 2.15.1-1exp1.

Revision history for this message
Graham Inggs (ginggs) wrote :

Fixed in hypre 2.15.1-2 in Ubuntu 19.04.

Changed in hypre (Ubuntu):
status: New → Fix Released
Changed in hypre (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.