Opened 8 months ago

Closed 3 months ago

Last modified 3 months ago

#61210 closed defect (fixed)

ftgl fails to link due to undefined symbols

Reported by: hellhovnd (Jean-Pierre Chauvel) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: bigsur Cc: chrstphrchvz (Christopher Chavez), ShadSterling (Shad Sterling), cooljeanius (Eric Gallager)
Port: ftgl

Description (last modified by hellhovnd (Jean-Pierre Chauvel))

Using macports from source (master commit 652c0b2aa03562ff4c1cdbb1676994b5a6886624) on Big Sur with Command Line Tools for Xcode 12 beta 5

Attachments (3)

main.log (209.1 KB) - added by hellhovnd (Jean-Pierre Chauvel) 8 months ago.
main.log
config.log (64.4 KB) - added by alex1platon 5 months ago.
main.2.log (208.8 KB) - added by murrayE 4 months ago.
main.log - added by murray 2021-01-30

Download all attachments as: .zip

Change History (22)

Changed 8 months ago by hellhovnd (Jean-Pierre Chauvel)

Attachment: main.log added

main.log

comment:1 Changed 8 months ago by hellhovnd (Jean-Pierre Chauvel)

Description: modified (diff)

comment:2 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

I haven't managed to reproduce this on macOS 10.15; I get other errors instead. My guess is that this port should be linking with -framework GLUT.

comment:3 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:4 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

Sorry, the port now builds for me without errors. (I can no longer reproduce the errors I initially encountered: libtool saying unknown tag CXX, and a linking command failing because it used clang instead of clang++.)

comment:5 Changed 8 months ago by mf2k (Frank Schima)

Cc: krugazor@… removed
Milestone: MacPorts 2.7.0
Owner: set to krugazor@…
Status: newassigned

comment:6 Changed 6 months ago by alex1platon

fails to link on Big Sur using Command Line Tools 12.2

:info:build libtool: link: /usr/bin/clang++ -dynamiclib  -o .libs/libftgl.2.dylib  .libs/libftgl_la-FTBuffer.o .libs/libftgl_la-FTCharmap.o 
.libs/libftgl_la-FTCleanup.o .libs/libftgl_la-FTContour.o .libs/libftgl_la-FTFace.o .libs/libftgl_la-FTGL.o .libs/libftgl_la-FTGlyphContaine
r.o .libs/libftgl_la-FTLibrary.o .libs/libftgl_la-FTPoint.o .libs/libftgl_la-FTSize.o .libs/libftgl_la-FTVectoriser.o .libs/libftgl_la-FTGly
ph.o .libs/libftgl_la-FTGlyphGlue.o .libs/libftgl_la-FTBitmapGlyph.o .libs/libftgl_la-FTBufferGlyph.o .libs/libftgl_la-FTExtrudeGlyph.o .lib
s/libftgl_la-FTOutlineGlyph.o .libs/libftgl_la-FTPixmapGlyph.o .libs/libftgl_la-FTPolygonGlyph.o .libs/libftgl_la-FTTextureGlyph.o .libs/lib
ftgl_la-FTTriangleExtractorGlyph.o .libs/libftgl_la-FTFont.o .libs/libftgl_la-FTFontGlue.o .libs/libftgl_la-FTBitmapFont.o .libs/libftgl_la-
FTBufferFont.o .libs/libftgl_la-FTExtrudeFont.o .libs/libftgl_la-FTOutlineFont.o .libs/libftgl_la-FTPixmapFont.o .libs/libftgl_la-FTPolygonF
ont.o .libs/libftgl_la-FTTextureFont.o .libs/libftgl_la-FTTriangleExtractorFont.o .libs/libftgl_la-FTLayout.o .libs/libftgl_la-FTLayoutGlue.
o .libs/libftgl_la-FTSimpleLayout.o   -L/opt/local/lib -lfreetype -lGL -lSM -lICE -lX11 -lXext -lXmu  -Os -stdlib=libc++ -arch x86_64 -Wl,-h
eaderpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch x86_64   -install_name  /opt/lo
cal/lib/libftgl.2.dylib -compatibility_version 7 -current_version 7.0 -Wl,-single_module
:info:build Undefined symbols for architecture x86_64:
:info:build   "_gluDeleteTess", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluNewTess", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessBeginContour", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessBeginPolygon", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessCallback", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessEndContour", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessEndPolygon", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessNormal", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessProperty", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessVertex", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

Changed 5 months ago by alex1platon

Attachment: config.log added

comment:7 Changed 5 months ago by ShadSterling (Shad Sterling)

Cc: ShadSterling added

comment:8 Changed 4 months ago by chrstphrchvz (Christopher Chavez)

In c8e235e051c90870b7429441e5bda5d95e4788e2/macports-ports (master):

ftgl, yafray: ports abandoned

See: #24592
See: #54418
See: #61210
Closes: #61213

comment:9 Changed 4 months ago by neverpanic (Clemens Lang)

Owner: krugazor@… deleted

comment:10 Changed 4 months ago by murrayE

Build failure with Xcode 12.4 and CLT 12.4 under BigSur 11.1:

:info:build mv -f .deps/libftgl_la-FTSimpleLayout.Tpo .deps/libftgl_la-FTSimpleLayout.Plo
:info:build /bin/sh ../libtool  --tag=CXX   --mode=link /usr/bin/clang++ -I/opt/local/include/freetype2 -I/opt/local/include/libpng16  -pipe -Os -std=c++11 -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -arch x86_64 -W -Wall -Wundef -Wfloat-equal  -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -Winline -no-undefined -version-number 2:4:0 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -arch x86_64 -W -Wall -Wundef -Wfloat-equal  -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare -Winline -o libftgl.la -rpath /opt/local/lib libftgl_la-FTBuffer.lo libftgl_la-FTCharmap.lo libftgl_la-FTCleanup.lo libftgl_la-FTContour.lo libftgl_la-FTFace.lo libftgl_la-FTGL.lo libftgl_la-FTGlyphContainer.lo libftgl_la-FTLibrary.lo libftgl_la-FTPoint.lo libftgl_la-FTSize.lo libftgl_la-FTVectoriser.lo libftgl_la-FTGlyph.lo libftgl_la-FTGlyphGlue.lo libftgl_la-FTBitmapGlyph.lo libftgl_la-FTBufferGlyph.lo libftgl_la-FTExtrudeGlyph.lo libftgl_la-FTOutlineGlyph.lo libftgl_la-FTPixmapGlyph.lo libftgl_la-FTPolygonGlyph.lo libftgl_la-FTTextureGlyph.lo libftgl_la-FTTriangleExtractorGlyph.lo  libftgl_la-FTFont.lo libftgl_la-FTFontGlue.lo libftgl_la-FTBitmapFont.lo libftgl_la-FTBufferFont.lo libftgl_la-FTExtrudeFont.lo libftgl_la-FTOutlineFont.lo libftgl_la-FTPixmapFont.lo libftgl_la-FTPolygonFont.lo libftgl_la-FTTextureFont.lo libftgl_la-FTTriangleExtractorFont.lo  libftgl_la-FTLayout.lo libftgl_la-FTLayoutGlue.lo libftgl_la-FTSimpleLayout.lo    -L/opt/local/lib -lfreetype -lGL  -lSM -lICE  -lX11 -lXext -lXmu  
:info:build libtool: link: /usr/bin/clang++ -dynamiclib  -o .libs/libftgl.2.dylib  .libs/libftgl_la-FTBuffer.o .libs/libftgl_la-FTCharmap.o .libs/libftgl_la-FTCleanup.o .libs/libftgl_la-FTContour.o .libs/libftgl_la-FTFace.o .libs/libftgl_la-FTGL.o .libs/libftgl_la-FTGlyphContainer.o .libs/libftgl_la-FTLibrary.o .libs/libftgl_la-FTPoint.o .libs/libftgl_la-FTSize.o .libs/libftgl_la-FTVectoriser.o .libs/libftgl_la-FTGlyph.o .libs/libftgl_la-FTGlyphGlue.o .libs/libftgl_la-FTBitmapGlyph.o .libs/libftgl_la-FTBufferGlyph.o .libs/libftgl_la-FTExtrudeGlyph.o .libs/libftgl_la-FTOutlineGlyph.o .libs/libftgl_la-FTPixmapGlyph.o .libs/libftgl_la-FTPolygonGlyph.o .libs/libftgl_la-FTTextureGlyph.o .libs/libftgl_la-FTTriangleExtractorGlyph.o .libs/libftgl_la-FTFont.o .libs/libftgl_la-FTFontGlue.o .libs/libftgl_la-FTBitmapFont.o .libs/libftgl_la-FTBufferFont.o .libs/libftgl_la-FTExtrudeFont.o .libs/libftgl_la-FTOutlineFont.o .libs/libftgl_la-FTPixmapFont.o .libs/libftgl_la-FTPolygonFont.o .libs/libftgl_la-FTTextureFont.o .libs/libftgl_la-FTTriangleExtractorFont.o .libs/libftgl_la-FTLayout.o .libs/libftgl_la-FTLayoutGlue.o .libs/libftgl_la-FTSimpleLayout.o   -L/opt/local/lib -lfreetype -lGL -lSM -lICE -lX11 -lXext -lXmu  -Os -stdlib=libc++ -arch x86_64 -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -arch x86_64   -install_name  /opt/local/lib/libftgl.2.dylib -compatibility_version 7 -current_version 7.0 -Wl,-single_module
:info:build ld: warning: dylib (/opt/local/lib/libXmu.dylib) was built for newer macOS version (11.1) than being linked (11.0)
:info:build ld: warning: dylib (/opt/local/lib/libXext.dylib) was built for newer macOS version (11.1) than being linked (11.0)
:info:build Undefined symbols for architecture x86_64:
:info:build   "_gluDeleteTess", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluNewTess", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessBeginContour", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessBeginPolygon", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessCallback", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessEndContour", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessEndPolygon", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessNormal", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessProperty", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build   "_gluTessVertex", referenced from:
:info:build       FTVectoriser::MakeMesh(double, int, float) in libftgl_la-FTVectoriser.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [libftgl.la] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ftgl/ftgl/work/frankheckenbach-ftgl-4836392/src'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ftgl/ftgl/work/frankheckenbach-ftgl-4836392'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ftgl/ftgl/work/frankheckenbach-ftgl-4836392'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ftgl/ftgl/work/ftgl-2.4.0" && /usr/bin/make -j16 -w all 
:info:build Exit code: 2
:error:build Failed to build ftgl: command execution failed
:debug:build Error code: CHILDSTATUS 82491 2

Note also warnings in Terminal during install attempt:

--->  Configuring ftgl
Warning: -----------------------------------------------------------------------
Warning: The port 'ftgl' uses the cxx11 PortGroup which is deprecated.
Warning: Please instead specify the required c++ standard directly using
Warning:     compiler.cxx_standard  2011
Warning: replacing 2011 with newer standards (e.g. 2014, 2017) as required.
Warning: For more details see https://trac.macports.org/wiki/CompilerSelection
Warning: -----------------------------------------------------------------------
--->  Building ftgl      

Changed 4 months ago by murrayE

Attachment: main.2.log added

main.log - added by murray 2021-01-30

comment:11 Changed 3 months ago by murrayE

Any workaround?

I need ftgl for installing gnuplot +aquaterm+luaterm+pangocairo+qt+wxwidgets+x11.

comment:12 Changed 3 months ago by ryandesign (Ryan Schmidt)

Keywords: bigsur added

Since we're talking about macOS 11 here and the log mentions libtool, it seems likely that this is the well-known libtool bug when running on macOS 11+ and it needs the standard fix from the libtool port's files directory. Let me take a look.

comment:13 Changed 3 months ago by ryandesign (Ryan Schmidt)

Unfortunately it's not that easy fix. This port already regenerates the configure script so it already contains the fixes from the libtool port.

comment:14 Changed 3 months ago by chrstphrchvz (Christopher Chavez)

PR opened to manually append -framework GLUT to LDFLAGS, which I believe will work: https://github.com/macports/macports-ports/pull/9991 (Edit: rejected in favor of better fix)

Last edited 3 months ago by chrstphrchvz (Christopher Chavez) (previous) (diff)

comment:15 Changed 3 months ago by ryandesign (Ryan Schmidt)

Owner: set to ryandesign
Status: assignedaccepted

The port deliberately wanted to prevent the use of GLUT since it was only needed for examples. There were a couple bugs in the upstream source that I've fixed and some warnings I've suppressed.

comment:16 Changed 3 months ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: acceptedclosed

In 0113e27a0056a2e458c33b719b998796b6bb7f69/macports-ports (master):

ftgl: Fix warnings and build failure on Big Sur

Add configure args to ensure we always use macOS OpenGL framework not
MacPorts mesa.

Add patches to fix upstream bugs in handling configure args and
libGL.dylib.

Specify path to glibtoolize to avoid erroneous warning from autogen.sh.

Use compiler.cxx_standard 2011 instead of cxx11 1.1 portgroup.

Suppress OpenGL deprecation warnings.

Because I'm not confident that files from MacPorts mesa could not have
been used before, increase revision to rebuild.

Closes: #61210

comment:17 Changed 3 months ago by ryandesign (Ryan Schmidt)

Sorry about the collision, Christopher. Guess we were both working on it at the same time. Hope it's alright that I went ahead with my version.

comment:18 Changed 3 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:19 Changed 3 months ago by chrstphrchvz (Christopher Chavez)

No worries, I simply never got around to proposing the workaround sooner; glad that it isn't needed after all. Thanks also to the reporter who sent us a reminder.

Note: See TracTickets for help on using tickets.