FLTK logo

STR #3191

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #3191

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:DLL/DSO
Summary:Shared library lacks visibility of xutf8 functions
Version:1.3.3
Created By:rej
Assigned To:AlbrechtS
Fix Version:1.3.4 (SVN: v10588)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 rej
11:55 Feb 16, 2015
fltk-1.3.3-xutf8-visibility.patch
4k
 
 
#2 AlbrechtS
17:27 Feb 16, 2015
export_XGetUtf8FontAndGlyph.diff
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 rej
11:55 Feb 16, 2015
libtool: link: exrdisplay: /usr/lib64/fltk/libfltk_gl.so: undefined reference to `XGetUtf8FontAndGlyph'

The attached patch is a bit of a hack, I think, since I include files from FL/Fl_Export.H in src/xutf8. Then again, perhaps Fl_EXport.H should not be distributed at all and moved one directory down?


See https://bugs.gentoo.org/show_bug.cgi?id=536842
 
 
#2 AlbrechtS
17:27 Feb 16, 2015
Thanks for the report and the patch.

Well, we did intentionally _not_ export all these xutf8 functions, but your log shows that libfltk_gl.so needs `XGetUtf8FontAndGlyph' which should be exported (or we must find another solution).

I verified that XGetUtf8FontAndGlyph is the only symbol that is really needed - hence I think that we should only export this single function.

Note that this is needed only if you configure without Xft, which is the reason why we didn't find it yet. So a simple solution (or better: workaround) would be to configure with Xft, if possible.

The uploaded patch file 'export_XGetUtf8FontAndGlyph.diff' should solve the reported issue.

And, btw, you are probably right that we should not *install* Fl_Export.H. We should check this. Thanks for this hint as well.
 
 
#3 AlbrechtS
04:58 Feb 17, 2015
Internal note for dev's:

I committed a new configure check to use the linker option '-no-undefined' in svn r 10582, as suggested by Greg recently. I marked it as experimental, but I'm confident that this is a good addition.

Now you can 'see' the failure when linking the shared library libfltk_gl.so (at least under Linux). Use:

make distclean; ./configure --disable-xft --enable-shared; make

Note that '--disable-xft' is necessary to show the bug.

See this new check near the end of configure:

checking if ld supports -no-undefined... yes
checking if ld supports -Bsymbolic-functions... yes
checking if toolchain supports sections... yes

The first line is the new check (should be 'yes').

Now linking libfltk_gl.so fails with:

g++ -L. -Wl,-no-undefined -Wl,-Bsymbolic-functions -Wl,-gc-sections -Wl,-soname,libfltk_gl.so.1.3 -lXcursor -lXfixes -lXext -lXinerama -lpthread -ldl -lm -lX11 -shared -fPIC -o libfltk_gl.so.1.3 ...
gl_draw.o: In function `gl_draw(char const*, int)':
gl_draw.cxx:(.text._Z7gl_drawPKci+0xc7): undefined reference to `XGetUtf8FontAndGlyph'

The posted patch (#2: export_XGetUtf8FontAndGlyph.diff) fixes this.

Are there any better solutions?
 
 
#4 AlbrechtS
05:42 Feb 22, 2015
Fixed in Subversion repository.

I renamed XGetUtf8FontAndGlyph() to fl_XGetUtf8FontAndGlyph() and exported it.

The rename was done to avoid name clashes with potential X (or other) functions.

All the other exports in the OP's patch are not needed, and as said before, we do not intend to export these internal function.

PS: I checked that we really need to install FL/Fl_Export.H because it is used in several other headers.
 
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.