LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2023, 09:02 AM   #1
coltson
Member
 
Registered: Oct 2010
Posts: 149

Rep: Reputation: 3
Weird "undefined reference to" when building pango


Hi. I was in the middle of pango's building process when the compilation was interrupted with the following error messages:
Code:
/media/34GB/Arquivos-de-Programas-Linux/Harfbuzz-1.4.2/lib/libharfbuzz.so: undefined reference to `FT_Get_Advance'
/home/leopoldo/Arquivos-de-Programas-Linux/pango-1.41.0/pango/.libs/libpangoft2-1.0.so: undefined reference to `FcWeightFromOpenType'
/media/34GB/Arquivos-de-Programas-Linux/Harfbuzz-1.4.2/lib/libharfbuzz.so: undefined reference to `FT_Reference_Face'
/home/leopoldo/Arquivos-de-Programas-Linux/pango-1.41.0/pango/.libs/libpangoft2-1.0.so: undefined reference to `FT_Face_GetCharVariantIndex'
/home/leopoldo/Arquivos-de-Programas-Linux/pango-1.41.0/pango/.libs/libpangoft2-1.0.so: undefined reference to `FcWeightToOpenType'
collect2: error: ld returned 1 exit status
These kind of errors are caused when the symbol (function, data structure) is not present in the auxiliary library that the program needs. But this does not seem to be the case here.

A quick search shows that
Code:
FT_Get_Advance
,
Code:
FT_Reference_Face
and
Code:
FT_Face_GetCharVariantIndex
are Freetype functions. I proceeded to Freetype's lib dir and issued a
Code:
nm -s libfreetype.so | grep FT_Get_Advance
,
Code:
nm -s libfreetype.so | grep FT_Reference_Face
and
Code:
nm -s libfreetype.so | grep FT_Face_GetCharVariantIndex
The result shows that the three functions are present in libfreetype. I then proceeded to Harfbuzz's lib dir and issued a
Code:
ldd libharfbuzz.so.0
. Which shows:
Code:
libfreetype.so.6 => /media/34GB/Arquivos-de-Programas-Linux/Freetype-2.6.5/lib/libfreetype.so.6 (0x00007f92132e4000)
So no idea why the error. For Harfbuzz I might have a solution, whih would be to simple use an older Freetype. With it, these two error messages are gone

Now to the other error messages...

A quick search shows that
Code:
FcWeightFromOpenType
and
Code:
FcWeightFromOpenType
are all from FontConfig

Repeating the procedures we have:
Code:
nm -s libfontconfig.so | grep FcWeightFromOpenType
Code:
nm -s libfontconfig.so | grep FcWeightToOpenType
that shows both present in libfontconfig.so

Issuing a
Code:
ldd libpangoft2-1.0.so
, shows that it is finding libfontconfig
Code:
libfontconfig.so.1 => /media/34GB/Arquivos-de-Programas-Linux/Fontconfig-2.12.0/lib/libfontconfig.so.1 (0x00007f1d9971c000)
So I am open to suggestions.
 
Old 10-18-2023, 05:33 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,454

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
On the library errors, "undefined reference to... " errors are always that the libraries involved are not recent enough. Using an earlier Freetype or leter dependency would help.

There's also the question of 32 & 64 bit libs, buut they usually return 'file bot found under ldd
 
1 members found this post helpful.
  


Reply

Tags
pango, undefined symbol



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could you explain the parameters "gain" and "reference" in the sox effect "loudness <gain> <reference>"? winger9 Linux - General 1 09-12-2021 04:23 AM
Countless "undefined reference" while building gtk 2.24 coltson Linux - Software 2 04-03-2021 01:50 PM
"Multiple definition of" and "undefined reference to" in QT Creator with QJson lib echelon89 Programming 1 05-01-2009 06:48 AM
Undefined Screen " XFree86" reference by serverLayout "XFree86 Configured" comox *BSD 7 01-17-2005 05:47 PM
Pango wants >=glib-2.4.0, I installed glib 2.4.7 and pango still says I need >=2.4.0 Locura Red Hat 5 11-01-2004 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration