[Kst] RE: error message

George Staikos staikos at kde.org
Fri Mar 18 16:46:23 CET 2005


On Friday 18 March 2005 10:38, Brisset, Nicolas wrote:
> >    Actually it was a bug in my autoconf check which I fixed
> > shortly after.  It was not linking to the C++ version of the
> > library.  It should be doing it now.
>
> I also had the problem yesterday with a recent snapshot that CDFLIBS was
> not set even though the configure checks found the cdf header and lib,
> and the datasource was compiled. I haven't had time to investigate
> though...
>
> > I haven't checked for
> > PIC issues but IIRC, the netCDF lib may not have been
> > compiled PIC here which would also cause this type of problem
> > on non-x86 platforms.
>
> Apparently, the netcdf distribution does not provide an easy way to
> compile a shared library. I added the -fPIC flag to CFLAGS and CPPFLAGS
> manually at configure time, and generated the .so manually (there is
> actually some help in one of the makefiles, like "make shared_library"
> in the right directory, but it does not recompile with -fPIC). However,
> I believe the -lnetcdf switch in the link command will use the .a lib if
> there isn't any .so, and that should also work. Or am I wrong ?

  Correct.  The problem, however, is not finding the library, but actually 
loading it.  Using a non-PIC library linked to the PIC code in Kst is 
technically against the rules, but just happens to work by coincidence on x86 
Linux.  On my powerbook, for instance, it would crash.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/


More information about the Kst mailing list