Opened 10 years ago
Closed 10 years ago
#47062 closed defect (worksforme)
octave: FLTK fails to link gl2ps
Reported by: | akarypid@… | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.3 |
Keywords: | Cc: | ||
Port: | octave |
Description
When I try to install octave:
$ port info octave octave @3.8.2_7 (math, science) Variants: accelerate, [+]atlas, dragonegg33, dragonegg34, g95, gcc44, gcc45, gcc46, gcc47, gcc48, [+]gcc49, [+]glgui, gui, metis, qtgui, x11
The configure script detects that FLTK can use OpenGL support and activates it:
:info:configure checking for OpenGL support in FLTK... yes :info:configure checking gl2ps.h usability... yes :info:configure checking gl2ps.h presence... yes :info:configure checking for gl2ps.h... yes
Then later during linking the gl2ps library is not found:
:info:build ld: library not found for -lgl2ps :info:build clang: error: linker command failed with exit code 1 (use -v to see invocation) :info:build make[3]: *** [liboctinterp.la] Error 1 :info:build make[3]: *** Waiting for unfinished jobs.... :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/work/octave-3.8.2/libinterp'
I am using MacPorts 2.3.3 and performed a self-update before filing this ticket, so none of my ports are outdated. I use clang from XCode 6.1.1 on Yosemite 10.10.2 and the gcc49 fortran compiler (installed from gcc49 macports package).
CC='/usr/bin/clang' ... F77='/opt/local/bin/gfortran-mp-4.9' F90='/opt/local/bin/gfortran-mp-4.9'
Attachments (2)
Change History (14)
Changed 10 years ago by akarypid@…
comment:2 Changed 10 years ago by akarypid@…
Here are the gl2ps port contents:
$ port contents gl2ps Port gl2ps contains: /opt/local/include/gl2ps.h /opt/local/share/doc/gl2ps/COPYING.GL2PS /opt/local/share/doc/gl2ps/COPYING.LGPL /opt/local/share/doc/gl2ps/README.txt /opt/local/share/doc/gl2ps/gl2psTest.c /opt/local/share/doc/gl2ps/gl2psTestSimple.c
I mention it because there doesn't seem to be any library inside... Just a header file.
Here is the output of searching for anything containing gl2ps in its name under /opt/local
$ sudo find /opt/local -name '*gl2ps*' /opt/local/include/gl2ps.h /opt/local/share/doc/gl2ps /opt/local/share/doc/gl2ps/gl2psTest.c /opt/local/share/doc/gl2ps/gl2psTestSimple.c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/work/octave-3.8.2/libinterp/corefcn/.libs/corefcn_libcorefcn_la-gl2ps-renderer.o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/work/octave-3.8.2/libinterp/corefcn/corefcn_libcorefcn_la-gl2ps-renderer.lo /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/work/octave-3.8.2/libinterp/corefcn/gl2ps-renderer.cc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/work/octave-3.8.2/libinterp/corefcn/gl2ps-renderer.h /opt/local/var/macports/distfiles/gl2ps /opt/local/var/macports/distfiles/gl2ps/gl2ps-1.3.8.tgz /opt/local/var/macports/registry/portfiles/gl2ps-1.3.8_6 /opt/local/var/macports/software/gl2ps /opt/local/var/macports/software/gl2ps/gl2ps-1.3.8_6.darwin_14.x86_64.tbz2 /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/gl2ps /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/math/octave/files/patch-gl2ps_renderer.diff
comment:3 follow-up: 5 Changed 10 years ago by michaelld (Michael Dickens)
This issue was hopefully addressed a few weeks ago. Thus, please do the following:
sudo port clean octave sudo port selfupdate sudo port install octave
and, hopefully octave now installs cleanly. If not, post a new build log to this ticket (use bzip2 on it beforehand if you can).
comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | michaelld@… openmaintainer@… akarypid@… removed |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
Summary: | FLTK fails to link gl2ps → octave: FLTK fails to link gl2ps |
comment:5 Changed 10 years ago by akarypid@…
Like I said, I was already using latest ports. No matter, I did do this anyway and the results are the same. New log is attached.
Replying to michaelld@…:
This issue was hopefully addressed a few weeks ago. Thus, please do the following:
sudo port clean octave sudo port selfupdate sudo port install octaveand, hopefully octave now installs cleanly. If not, post a new build log to this ticket (use bzip2 on it beforehand if you can).
Changed 10 years ago by akarypid@…
Attachment: | main.2.log added |
---|
Second main.log after updating ports
comment:6 Changed 10 years ago by michaelld (Michael Dickens)
OK; thanks. Can you do the following:
sudo port uninstall gl2ps sudo port clean --all gl2ps sudo port install gl2ps
and, if all that works, then what does "port contents gl2ps" return? It should contain the dylib (and links to it). This is why your octave install is failing: libgl2ps.dylib does not exist because it wasn't installed by MacPorts for some reason.
comment:7 Changed 10 years ago by akarypid@…
Hi,
Yes, that is exactly the case, which is why I followed up with comment:2. I had already tried rebuilding when I posted the that.
Anyway, even after the 3 commands above the result is the same (see comment:2).
I picked up file /opt/local/var/macports/distfiles/gl2ps/gl2ps-1.3.8.tgz and extracted it in my home directory. I then did a build (cmake && make)" and it does create the dynamic libraries. I even installed them with "make install". I've no idea why macports does not install them. Will look into it when I steal some more time.
comment:8 Changed 10 years ago by akarypid@…
Hello again,
I have isolated the problem. When configuring the port, the command executed is:
cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" -DCMAKE_OSX_SYSROOT="/"
When I use the above command in my own private working directory, I get the same behavior (no dynamic libraries are built. So the following steps replicate the issue even outside macports:
tar zxvf /opt/local/var/macports/distfiles/gl2ps/gl2ps-1.3.8.tgz cd gl2ps-1.3.8-source cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" -DCMAKE_OSX_SYSROOT="/"
I found that the parameter that causes the behavior is the -DCMAKE_OSX_SYSROOT="/"
in the end. When I remove that, the build happens normally.
I think the root cause of this behavior is: https://trac.macports.org/ticket/44581
comment:9 Changed 10 years ago by akarypid@…
In any case, I think you can close this ticket. The problem is definitely unrelated to octave/fltk/gl2ps. It seems to me more like some issue with the command line tools bundled with XCode and the way macports and cmake interact with them...
comment:10 Changed 10 years ago by michaelld (Michael Dickens)
OK; thanks for your feedback; good to know that you're making progress. Can you try the following and see if it installs the gl2ps.dylib's?
sudo port uninstall gl2ps sudo port clean --all gl2ps sudo port -s install gl2ps
Note the "-s" on the install; means "compile from source". I'm guessing that the pre-compiled binary is messed up (which is what you'd generally get without the "-s").
comment:11 Changed 10 years ago by akarypid@…
Actually I've fixed the issue by installing the stand-alone command-line tools package; see my comments here: https://trac.macports.org/ticket/44581#comment:93 https://trac.macports.org/ticket/44581#comment:94
I think macports simply does not support the packaging for the command line tools bundled in XCode 6. It probably still expects stuff to be present in /usr/include (which is not the case unless you install the stand-alone version of the command line tools).
After I did an "xcode-select --install" I was able to install gl2ps normally and the libraries got built (as well as octave itself). So everything seems fine (there is no bug); it's just that my setup is not supported... So if anyone comes across this ticket because they have the same problem, simply do "xcode-select --install" and then remove gl2ps with "port uninstall gl2ps". Finally, re-build octave with "port install octave" and it should re-build gl2ps properly and proceed to succeed in building octave as well.
comment:12 Changed 10 years ago by michaelld (Michael Dickens)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
OK; sounds good. I'll go ahead and close this ticket.
Log file for installation