12.2-RELEASE-p7 FreeBSD 12.2-RELEASE-p7 GENERIC amd64
Erlang/OTP 24 [erts-12.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace] [sharing-preserving]
* Eshell V12.0.2 (abort with ^G)
=ERROR REPORT==== 22-Jun-2021::14:32:47.235595 ===
WX ERROR: Could not load library: load_failed
Failed to load NIF library
'/usr/local/lib/libwx_gtk3u_gl-3.1.so.5: Undefined symbol "eglGetPlatformDisplay"'
thanks for the PR, John.
Can you clarify how your erlang was built (poudriere, make, any special make.conf tunables, any other runtime24 options enabled?)?
Did you have similar issues with 24.0, 24.0.1, or 24.0.2? or just 24.0.2_1?
I've got no trouble running it here on 12.2-RELEASE, built from latest dependencies via `make package`.
Erlang/OTP 24 [erts-12.0.2] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [jit] [dtrace] [sharing-preserving]
Eshell V12.0.2 (abort with ^G)
A full 12.2 poudriere run is going to take a few more hours to complete here, but I'll report back with that tomorrow.
It will help if you can attach your build log. preferably a poudriere one.
$ readelf -s /usr/local/lib/libwx_gtk3u_gl-3.1.so.5.0.0 |grep eglGetPlatformDisplay
295: 0000000000000000 0 FUNC GLOBAL DEFAULT UND eglGetPlatformDisplay
> pkg which /usr/local/lib/libwx_gtk3u_gl-3.1.so.5
/usr/local/lib/libwx_gtk3u_gl-3.1.so.5 was installed by package wx31-gtk3-3.1.5
is it possible your wx dependencies aren't up to date?
(In reply to Dave Cottlehuber from comment #2)
I ran make config to set the WX option, then I just built using make.
When I run the 'readelf' and 'pkg which' commands as you suggest, I see exactly the same results as in your listing.
Is there any connection with erlang-wx? I built this and found that it was installed for erlang-wx-18.104.22.168_1,1 (or is this a red herring?).
There may be a conflict because I normally run off packages rather than ports, so this is a one-off build. (I used to build everything with synth, but reverted to trying to live with packages for an easier life!).
(In reply to John Parkey from comment #3)
In reply to your other question, I have only attempted with 24.0.2_1
OK so try this:
# or where-ever your ports tree is
# I assume you have a clean, up to date git tree
$ cd /usr/ports
$ git clean -fdx
$ cd lang/erlang-runtime24
# get existing packages up to date
$ sudo pkg upgrade -r FreeBSD
# polish options as required
$ sudo make config
# ensure we have appropriate dependencies *also* up to date
$ sudo pkg install -r FreeBSD --automatic $(make build-depends-list run-depends-list | sed -E -e 's,^.+/([^/]+/[^/]+$),\1,')
$ make clean package
$ sudo make reinstall
FWIW you can cheat and use erlang-wx directly, even to connect to an OTP24 instance:
$ export PATH=/usr/local/lib/erlang/bin:$PATH
$ pkill -ilf observerl > /dev/null 2>&1
$ /usr/local/lib/erlang/bin/erl -name observerl -setcookie monster -s observer start -detached
most of the time this Just Works :-) and no need for building a custom erlang.
I highly recommend using poudriere next time, the effort once set up is easy, and the results tend to avoid issues like yours!
(In reply to Dave Cottlehuber from comment #5)
sudo pkg install -r FreeBSD --automatic $(make build-depends-list run-depends-list | sed -E -e 's,^.+/([^/]+/[^/]+$),\1,')
gives me an error "Illegal variable name"
Just completed the build process as you advised, but get exactly the same error as previously.
I spent the weekend rebuilding everything under Synth. After a lot of tracing in the erl terminal, and various research, I have finally discovered that the problem is nothing to do with the erlang port. The error is due to the nvidia driver not supporting the egl call.
Apologies for wasting your time on this. Please close.
not wasted at all and I'm relieved to hear the port is fine!
FWIW I am running on an NVIDIA here without issue, maybe you just need to jump to 13.0?
- nvidia-driver 460.80
- FreeBSD 13.0-RELEASE amd64
- GeForce 1050Ti KalmX
(In reply to Dave Cottlehuber from comment #9)
I upgraded to 13.0 (I also had to upgrade my old nvidia GT 610 as this seems to be the only card which is not supported by the new driver).
Now works correctly.