Werner, there is an important question for you below:

On 2006-10-17 20:16+0200 Werner Smekal wrote:

> [...] cd /home/smekal/DevZone/plplot/buildcygwin/drivers && ./get-drv-info 
> hpgl > 
> /home/smekal/DevZone/plplot/buildcygwin/drivers/hpgl.rc
> Could not open driver module hpgl
> libltdl error: No such file or directory
>
> get-drv-info doesn't find hpgl even if i run the program with
> ./get-drv-info hpgl.so

First some background to explain this problem.

On Linux here are the (different) results with hpgl and hpgl.so:

[EMAIL PROTECTED]> ./get-drv-info hpgl 
hp7470:HP 7470 Plotter File (HPGL Cartridge, Small Plotter):0:hpgl:34:hp7470
hp7580:HP 7580 Plotter File (Large Plotter):0:hpgl:35:hp7580
lj_hpgl:HP Laserjet III, HPGL emulation mode:0:hpgl:36:lj_hpgl

[EMAIL PROTECTED]> ./get-drv-info hpgl.so
Could not read symbol plD_DEVICE_INFO_hpgl.so in driver module hpgl.so
libltdl error: /home/software/autotools/install/lib/libltdl.so.3: undefined
symbol: plD_DEVICE_INFO_hpgl.so

Have a look at drivers/get-drv-info.c to see what is going on for these two
cases.

* In the first (hpgl) case, lt_dlopenext is called with "hpgl". According to
   the documentation of lt_dlopenext (see info libtool on any Linux distro)
   it first tries the filename hpgl, then hpgl.la, then hpgl.extension where
   _for Linux_ ".extension" is ".so" and therefore that try succeeds on
   Linux.  I presume all tries are failing on Cygwin (explaining your error
   above) because ".extension" (as understood by libltdl on Cygwin is not
   ".so"). In other words, libltdl is too smart for what I have done in our
   CBS which is to always (regardless of platform) create the shared object
   with the .so extension.

* In the second (hpgl.so) case it immediately finds the file, but then it
   looks for the symbol plD_DEVICE_INFO_hpgl.so rather than the correct
   plD_DEVICE_INFO_hpgl in that shared object and therefore fails with the
   above error message.

Important question: do you get that same error message about undefined
symbol on Cygwin for the hpgl.so case?  If so, then in your case libltdl is
finding and reading hpgl.so properly, and it should be straightforward to
fix the symbol problem.

Here is my proposed fix (assuming you are getting the undefined symbol error
with hpgl.so rather than not being able to open that shared object at all).
Note, the input to get-drv-info must continue to be free of specific
suffixes so that the correct symbol will be found in the file. However, I
suggest we change get-drv-info.c so that it first searches for the shared
object with the ".so" suffix (what we create on all platforms for our CBS
system).  We can use lt_dlopen for that purpose rather than lt_dlopenext. If
that fails it should fall back to the normal lt_dlopenext call without the
.so suffix that is currently done.  Thus,our ABS should be unaffected by the
proposed fix.

Once we get the fixed get-drv-info to work on Cygwin (and Linux), we also
have to make parallel changes to plcore.c.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to