| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #3156
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | DLL/DSO |
Summary: | undefined reference to `Fl_XFont_On_Demand::value()' |
Version: | 1.3.3 |
Created By: | pgajdos |
Assigned To: | AlbrechtS |
Fix Version: | 1.3.4 (SVN: v10504) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | pgajdos 05:34 Nov 20, 2014 |
| fltk 1.3.3. While compiling with --no-undefined, I get while linking libfltk_gl.so.1.3:
[ 8s] g++ -Wl,--no-undefined -L. -Wl,-Bsymbolic-functions -Wl,-gc-sections -Wl,-soname,libfltk_gl.so.1.3 -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11 -shared -fPIC -o libfltk_gl.so.1.3 Fl_Gl_Choice.o Fl_Gl_Overlay.o Fl_Gl_Device_Plugin.o Fl_Gl_Window.o freeglut_geometry.o freeglut_stroke_mono_roman.o freeglut_stroke_roman.o freeglut_teapot.o gl_draw.o gl_start.o glut_compatability.o glut_font.o -L. -lfltk -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11 -lGL -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11 [ 8s] gl_draw.o: In function `Fl_XFont_On_Demand::operator XFontStruct*()': [ 8s] /home/abuild/rpmbuild/BUILD/fltk-1.3.3/src/../FL/x.H:126: undefined reference to `Fl_XFont_On_Demand::value()' [ 8s] collect2: error: ld returned 1 exit status
Or when I compile fltk without --no-undefined, trying to link cube example: $ g++ -o cube cube.cxx -lfltk_gl -lfltk -lGL -DHAVE_GL=1 /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/libfltk_gl.so: undefined reference to `Fl_XFont_On_Demand::value()' collect2: error: ld returned 1 exit status | |
|
#2 | pgajdos 05:35 Nov 20, 2014 |
| Am I missing something? | |
|
#3 | danfe 22:42 Feb 10, 2015 |
| Correct; since 1.3.3 FLTK now hides symbols by default, unless they were explicitly exported. You can either mark Fl_XFont_On_Demand::value() method with __attribute__((visibility("default"))), or FL_EXPORT entire class.
https://groups.google.com/forum/#!msg/fltkgeneral/GT6i2KGCb3A/6LUS96-xMz8J https://bugs.gentoo.org/show_bug.cgi?id=529346
Apparently it was not supposed to be exported, but the problem is it's shared between two libraries (fltk.so and fltk_gl.so).
I guess this STR can be closed when real solution gets committed (if wasn't already). | |
|
#4 | AlbrechtS 05:05 Feb 11, 2015 |
| Fixed in Subversion repository.
Thanks for the original report and the heads-up. I wasn't aware that this STR was still open.
The fix is in svn release 10504. I'm uploading a patch file for those who don't have svn access or need to fix the issue with a local patch.
The patch can be applied to the FLTK 1.3.3 source distributioin with a minor warning:
patching file src/fl_font.cxx patching file src/gl_draw.cxx Hunk #1 succeeded at 84 (offset 3 lines). patching file FL/x.H
... and compiles w/o errors. I didn't check the linking issue though.
Please confirm that this patch for FLTK 1.3.3 fixes the issue for you.
The current svn version and the latest snapshots should also be okay. | |
[ Return to Bugs & Features ]
|
| |