Created attachment 272196 [details] Automatically generated debug report After a fresh install, hugin crashes with the message ERROR: 08:37:15.422071 (/wrkdirs/usr/ports/graphics/hugin/work/hugin-2025.0.1/src/hugin1/hugin/GLViewer.cpp:157) SetUpContext(): Error initialising GLEW: Unknown error. WARN: 08:37:15.431470 (/wrkdirs/usr/ports/graphics/hugin/work/hugin-2025.0.1/src/hugin_base/panodata/Panorama.h:639) isDirty(): modification status mismatch. Abort trap (core dumped) hugin A popup appears: Error initializing GLEW Fast preview window can not be opened. I have seen this "initializing GLEW" error on other machines, but there it was recoverable. This is a fresh install, and the problem is repeatable and fatal. System: FreeBSD bde.lemis.com 14.4-STABLE FreeBSD 14.4-STABLE #2: Thu May 14 21:57:38 AEST 2026 grog@bde.lemis.com:/usr/obj/hydra/home/src/FreeBSD/git/stable/14/amd64.amd64/sys/GENERIC amd64 The attachment is a debug report generated at the time of the crash.
Thank you for your report. I cannot reproduce this issue on my machine and have reported it to the hugin-ptx mailing list. Will keep you posted.
On the hugin-ptx list, it was said: > From INSTALL_cmake > > On Linux wxWidgets 3.1.5 and later is by default compiled with EGL support for the > wxGLCanvas class. In this case you need to activate EGL support explicitly also in > GLEW, otherwise there are crashes when intializing the wxGLCanvas. Alternatively > you can also use the epoxy library instead of GLEW, which does the detection at > run time. To build with epoxy add -DBUILD_WITH_EPOXY=on to the CMake command line. Did you change any port options in the dependencies? We do not currently have epoxy wired up into the port options, but I can look into adding that if you want to try it out.
Alternatively, which graphics driver and GPU do you use? The old nvidia-driver-340 does not support EGL at all...
(In reply to Robert Clausecker from comment #2) I had the same problem, finding the same cause of GLEW being built without EGL support causing hugin to crash when opening the GL preview window. I did as hugin instructed, taking glew out of USE_GL and adding -DBUILD_WITH_EPOXY=on to CMAKE_ARGS and it works correctly. libepoxy was already being brought in by other depends but perhaps it should be made an explicit dependency. I don't see why it doesn't crash everyone since the port was updated to wxgtk32 as GLEW looks to have never supported EGL on FreeBSD (there is no config/Makefile.freebsd-egl as there is for linux-egl).
Created attachment 272235 [details] Makefile patch to work around the problem
(In reply to Darren Mulligan from comment #4) Yes, this worked around the problem. Thanks. I'm attaching diffs to the Makefile. fuz@, I'd strongly recommend applying the patch and maybe adding something to the pkg-msg noting that the other options may work.
Thanks, will have a look at the patch and perhaps commit it.
Created attachment 272268 [details] graphics/hugin: permit use of epoxy instead of glew I plan to use attached patch to address the issue. It adds a new toggle to switch between GLEW and EPOXY at compile time. The patch is as of now untested; please test and let me know if it does the trick.
(In reply to Robert Clausecker from comment #8) I can confirm that this works as expected, not just on the test machine (bde), but also on my main machine (hydra).
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=2fa6358ccc39f9ef705ca209fc9dacf276ef69df commit 2fa6358ccc39f9ef705ca209fc9dacf276ef69df Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2026-06-29 15:57:53 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-06-30 19:06:31 +0000 graphics/hugin: permit use of libepoxy instead of glew Some users report problems with hugin coming from graphics/glew not being built with EGL support. Permit using libepoxy instead of graphics/glew for OpenGL stuff and make it the default to work around this issue. Building with graphics/glew remains available as an option. PR: 296330, 296368 Reported by: grog Tested by: grog MFH: 2026Q2 graphics/hugin/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
Thank you for your report, proposed patch, and testing!
A commit in branch 2026Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=14e9dfc4dbd4f334665ad57143bc4289be07a295 commit 14e9dfc4dbd4f334665ad57143bc4289be07a295 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2026-06-29 15:57:53 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2026-06-30 19:08:34 +0000 graphics/hugin: permit use of libepoxy instead of glew Some users report problems with hugin coming from graphics/glew not being built with EGL support. Permit using libepoxy instead of graphics/glew for OpenGL stuff and make it the default to work around this issue. Building with graphics/glew remains available as an option. PR: 296330, 296368 Reported by: grog Tested by: grog MFH: 2026Q2 (cherry picked from commit 2fa6358ccc39f9ef705ca209fc9dacf276ef69df) graphics/hugin/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)