Bug 277433 - x11-toolkits/py-fltk 1.3.9 raises exception on import
Summary: x11-toolkits/py-fltk 1.3.9 raises exception on import
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on: 277439
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-02 11:56 UTC by Hiroo Ono
Modified: 2024-03-02 22:59 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (python)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiroo Ono 2024-03-02 11:56:43 UTC
On 14-STABLE (amd64), importing py-fltk-1.3.9 emits the following exception.

----
>>> import fltk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/fltk/__init__.py", line 9, in <module>
    from .fltk import *
  File "/usr/local/lib/python3.9/site-packages/fltk/fltk.py", line 17, in <module>
    from . import _fltk
ImportError: /usr/local/lib/python3.9/site-packages/fltk/_fltk.cpython-39.so: Undefined symbol "_ZN18Fl_XFont_On_Demand5valueEv"
----

Did poudriere options -r ... x11-toolkits/py-fltk, rebuilt the packages and reinstalled them. So the port options should be default.
The system was upgraded from 13-STABLE recently, and py39-fltk which was built around the middle of 2023 worked there.
Comment 1 Hiroo Ono 2024-03-02 16:55:08 UTC
It turned out that fltk-1.3.9's libfltk.so.1.3 does not have the symbol _ZN18Fl_XFont_On_Demand5valueEv.
The library file from https://pkg.freebsd.org/FreeBSD:14:amd64/latest/All/fltk-1.3.9_1.pkg is same, while the library file from https://pkg.freebsd.org/FreeBSD:13:amd64/release_2/All/fltk-1.3.8.pkg has the symbol.
I checked the library file from Arch Linux's fltk-1.3.9 package and it had the symbol.
So, there should be something wrong with the build of ports' fltk-1.3.9.
Cc'ing to the maintainer of x11-toolkits/fltk.
Comment 2 Hiroo Ono 2024-03-02 21:37:07 UTC
doing poudriere testport -i ... x11-toolkits/fltk and see the intermediate data,

readelf -a lib/libfltk.a emits the following:
118: 0000000000000000  1010 FUNC    GLOBAL HIDDEN    21 _ZN18Fl_XFont_On_Demand5valueEv

and readelf -a src/libfltk.so emits the following:
909: 0000000000100a10  1010 FUNC    LOCAL  HIDDEN    14 _ZN18Fl_XFont_On_Demand5valueEv

I think it should be DEFAULT instead of HIDDEN, but currently I have no idea why it became so.
Comment 3 Hiroo Ono 2024-03-02 22:59:44 UTC
Reported the fix to x11-toolkits/fltk in bug 277439.
Maybe, PORTREVISION should be bumped after it gets fixed.