Hi Dmitry, ports policy is that library version numbers are under control of ports, we have had times where we've needed to bump various libraries following a change in the base OS (not at all often, but it has happened), also in many cases we have found that ports don't bump their library version when the ABI is changed and we have to do that ourselves, so generally we are just using our own numbering.
I've just seen that I can replicate the problem that Tracey saw here (I was unable to before) and have figured out what's happening, though not a fix yet. The symbols mentioned, guile2.2:/usr/local/lib/libleptongui.so.0.0: undefined symbol 'scm_i_freelist' guile2.2:/usr/local/lib/libleptongui.so.0.0: undefined symbol 'scm_i_master_freelist' guile2.2:/usr/local/lib/libleptongui.so.0.0: undefined symbol 'scm_cells_allocated' etc. are in guile 1.x but not 2.x: $ nm -s libguile.so.20.0 | grep scm_i_freelist 0012b8d0 B scm_i_freelist 0012b8d4 B scm_i_freelist2 $ nm -s libguile-2.2.so.0.2 | grep scm_i_freelist $ and referenced from libleptongui if guile 1 was present at build time $ nm -s /usr/local/lib/libleptongui.so.0.0 |grep scm_i_f U scm_i_freelist but leptongui *is* linked against guile 2 lib $ objdump -p /usr/local/lib/libleptongui.so.0.0 | grep -i guile NEEDED libguile-2.2.so.0.2 required from libguile-2.2.so.0.2: 0x0e0b6980 0x00 02 GUILE_2.0 The problem is that it's picking up guile 1.x headers in preference to those for 2.x. Unfortunately guile 1.x headers are placed directly in /usr/local/include so they're picked up in preference because that is listed first in the places where guile is needed. For now I have added a check to the port to prevent building a miscompiled package. It needs an actual fix but this is at least a start. One fix would be to ensure /usr/local/include/guile/2.2 is searched before /usr/local/include but I've not found a way (including some fairly disgusting hacks) to do this without major work to the build system. Another possibility would be for us to move guile 1's headers to a subdirectory, which is probably the cleanest fix, but will likely mean adjusting the 8 ports using it to cope. Anyone else have an idea that I've missed? On 2022/03/26 21:45, Dmitry Pryakhin wrote: > On Fri, 18 Mar 2022 09:44:19 -0600 > Tracey Emery <tra...@traceyemery.net> wrote: > > > Hello, > > > > I ok'd the import of lepton into ports by sthen@ yesterday. Upon > > testing, there is a problem. I don't understand the ins-and-outs of > > the lepton software yet, so sending this problem to you. The errors > > when starting are below. I'm hoping it is just an anomaly on my > > laptop. I've rebuilt this twice just to be sure. This is built > > against -current: > > > > OpenBSD 7.1-beta (GENERIC.MP) #422: Tue Mar 15 11:28:22 MDT 2022 > > > > CC'ing sthen on this, so he's in on the loop. > > > > Thanks! > > > > > ... [skip] > > In unknown file: > > 0 (dynamic-link "libleptongui") > > ERROR: In procedure dynamic-link: > > In procedure dynamic-link: file: "libleptongui", message: "file not > > found" > > > Hello, > > Sorry for the delay. I've tested both binary package installed > with pkg_add(1) and built from the ports tree on this system: > > OpenBSD 7.1-beta (GENERIC.MP) #441: Fri Mar 25 11:36:26 MDT 2022 > > Unfortunately, I can't reproduce the error, lepton-schematic > works as intended. Looking at the error messages I see that it > cannot load the library libleptongui. > I noticed that library versions in port's Makefile are wrong: > both libleptongui and liblepton versions are set to 0.0, but > should be 4.0 and 10.0, respectively. Please try to build with > the attached patch applied (created with 'cvs diff'). I would > also suggest to delete Guile cache before starting the > application (rm -rf ~/.cache/guile/). > Thank you for accepting Lepton to the OpenBSD ports collection! > > Regards, > Dmitry. > Index: Makefile > =================================================================== > RCS file: /cvs/ports/cad/lepton-eda/Makefile,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 Makefile > --- Makefile 18 Mar 2022 09:42:36 -0000 1.1.1.1 > +++ Makefile 26 Mar 2022 17:18:56 -0000 > @@ -3,8 +3,8 @@ COMMENT = lepton electronic design autom > V = 1.9.17-20211219 > DISTNAME = lepton-eda-${V:C/-.*//} > > -SHARED_LIBS += lepton 0.0 # 8.0 > -SHARED_LIBS += leptongui 0.0 # 2.0 > +SHARED_LIBS += lepton 10.0 # 10.0 > +SHARED_LIBS += leptongui 4.0 # 4.0 > > CATEGORIES = cad >