[MacPorts] #58925: octave +fltk @5.1.0_1 build failure: ld: framework not found OpenGL

MacPorts noreply at macports.org
Tue Sep 3 23:06:13 UTC 2019


#58925: octave +fltk @5.1.0_1 build failure: ld: framework not found OpenGL
--------------------+--------------------
 Reporter:  prbuen  |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:
--------------------+--------------------
 Hi,
 I am trying to build octave with the +fltk variant. It fails as it seems
 ld doesn't find OpenGL. Here is the error in `main.log`:
 {{{
 :info:build   CXXLD    libinterp/dldfcn/__eigs__.la
 :info:build   CXXLD    libinterp/dldfcn/__delaunayn__.la
 :info:build   CXXLD    libinterp/dldfcn/__fltk_uigetfile__.la
 :info:build   CXXLD    libinterp/dldfcn/__glpk__.la
 :info:build   CXXLD    libinterp/dldfcn/__init_fltk__.la
 :info:build   CXXLD    libinterp/dldfcn/__init_gnuplot__.la
 :info:build   CXXLD    libinterp/dldfcn/__voronoi__.la
 :info:build   CXXLD    libinterp/dldfcn/__ode15__.la
 :info:build ld: framework not found OpenGL
 :info:build clang: error: linker command failed with exit code 1 (use -v
 to see invocation)
 :info:build make[2]: *** [libinterp/dldfcn/__init_fltk__.la] Error 1
 }}}

 Earlier, however, the configure script (which include `--with-fltk --with-
 framework-opengl`) seems to have tested for OpenGL successfully:
 {{{
 :info:configure checking whether /opt/local/libexec/llvm-8.0/bin/ld
 accepts -framework OpenGL... yes
 :info:configure configure: adding -framework OpenGL to OPENGL_LIBS
 }}}
 and also
 {{{
 :info:configure checking for OpenGL support in FLTK... yes
 }}}

 As far as I can see, the FLTK LDFLAGS include the OpenGL framework:
 {{{
 :info:configure   FLTK LDFLAGS:                  -L/opt/local/lib
 -Wl,-headerpad_max_install_names
 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -framework OpenGL -framework Cocoa
 }}}
 but it looks like these flags are not taken into account when linking
 `libinterp/dldfcn`?

 I must say that I am trying to build without XCode being installed, and
 the flag above includes the .sdk from XCode.app. Still, the error I get
 seems related to `-framework OpenGL` or to a wrong library search path in
 `ld`.

 I can compile from source fine without the `+fltk` variant. Any idea how
 to fix the library search path above?

 When I compile a "hello world" with `gcc-mp-9 -v` I get the following:
 {{{
 Library search paths:
         /usr/local/lib
         /opt/local/lib/gcc9/gcc/x86_64-apple-darwin18/9.2.0
         /opt/local/lib/gcc9
         /usr/lib
         /usr/local/lib
 Framework search paths:
         /Library/Frameworks/
         /System/Library/Frameworks/
 }}}
 and I have `OpenGL.framework` at
 {{{
 /System/Library/Frameworks/OpenGL.framework/
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/58925>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list