Bug#949828: libnetcdf-c++4-1: underlinked libnetcdf_c++4.so.1: undefined symbol: nc_*
Andreas Beckmann
anbe at debian.org
Sat Jan 25 15:38:25 GMT 2020
Control: tag -1 - moreinfo
On 25/01/2020 15.40, Sebastiaan Couwenberg wrote:
> The build logs shows it downloading both the old and new libnetcdf:
>
> libnetcdf15 1:4.7.3-1
> libnetcdf13 1:4.6.2-1+b1
But none of them is used by libnetcdf-c++4-1
> Since we're currently transitioning to the new netcdf, I think this is
> just bad timing. Rebuild python-escript once the netcdf transition is
> further along, i.e. when none of the transitive build dependencies pull
> in the old netcdf.
I thought so as well, but a well designed transition should not result
in missing symbols, therefore I looked deeper.
> The build logs shows it using:
>
> libnetcdf-c++4 4.2-11+b1, has been rebuild for the transition
> libnetcdf-c++4-1 4.3.1-1, has not been rebuild for the transition
Try linking something against libnetcdf_c++4.so.1 only:
(needs only build-essential + libnetcdf-c++4-1)
$ echo 'int main() {}' > x.c
$ gcc x.c -Wl,--no-as-needed /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1: undefined reference to `nc_get_var1_ulonglong'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1: undefined reference to `nc_get_att_uint'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1: undefined reference to `nc_def_var_fill'
...
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1: undefined reference to `nc_inq_var_endian'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1: undefined reference to `nc_get_var_ulonglong'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libnetcdf_c++4.so.1: undefined reference to `nc_inq_user_type'
collect2: error: ld returned 1 exit status
Andreas
More information about the Pkg-grass-devel
mailing list