Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#49423 closed defect (fixed)

Octave configure can't find Qt libraries in El Capitan

Reported by: JonoMH Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: octave

Description

I've got Qt 4 installed via macports and most other ports that require it as a dependancy (including KDE) have no problem finding the Qt 4 libraries and successfully linking against them to build. However, when installing Octave, the +gui variant also requires Qt 4 as a dependancy and detects that it is installed but the gui won't build and Octave will install without the gui even if you use the +gui variant. Digging deeper, I found that the reason was that the problem occurs during the configure stage where Octave's configure script cannot find the the Qt libraries and thus disables the gui build, even though the configure of other applications do. The configure log contains the warning "WARNING: Qt libraries not found -- disabling GUI". I've attached the entire log

Attachments (1)

config.log (2.1 MB) - added by JonoMH 9 years ago.
Octave configure log

Change History (6)

Changed 9 years ago by JonoMH

Attachment: config.log added

Octave configure log

comment:1 Changed 9 years ago by JonoMH

Cc: hartman.jonathan2@… added

Cc Me!

comment:2 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: michaelld@… hartman.jonathan2@… removed
Owner: changed from macports-tickets@… to michaelld@…
Port: octave added

The qt4-mac port was recently reorganized. Some ports that use Qt (apparently including octave) will need to be revised. Adding the qt4 1.0 portgroup would be the first step, and might be the only needed step.

comment:3 in reply to:  2 Changed 9 years ago by JonoMH

Replying to ryandesign@…:

The qt4-mac port was recently reorganized. Some ports that use Qt (apparently including octave) will need to be revised. Adding the qt4 1.0 portgroup would be the first step, and might be the only needed step.

Well, the problem seems to be caused by Qt no longer being installed in the same directories that it used to be installed in and the Octave configure searches for it in the old directories. Copying the relevant .pc files into the old directory and creating symbolic links to the relevant binaries seems to of helped pkgconfig find where the Qt libraries are stored and where the required programs are respectively. Before installing Octave, I entered the following commands in the Bash shell:

sudo cp -R /opt/local/libexec/qt4/lib/pkgconfig/ /opt/local/share/pkgconfig

and

sudo ln -s /opt/local/libexec/qt4/bin/* /opt/local/bin

The first command copies the .pc files from where qt4 is installed to a directory where pkg-config can find them and the second command creates symbolic links to the required binaries in a directory that is searched by the Octave configure script. Once these are typed in, then the Octave configure script finds the directory where Qt4 is installed and the gui compiles correctly if you type

sudo port install octave +atlas +gui

This is still a problem with the package though if it's searching for Qt in the wrong directories. I solved it by manually copying some files and creating symbolic links to the directories where the new qt4-mac port is installed. So, I think that this is still a bug that needs to be fixed.

comment:4 Changed 9 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

Fixed in r141784. Simple enough to add the qt4 PortGroup to the +qtgui variant. This PortGroup augments the pkgconfig path to include that for qt4, no matter where it is installed.

comment:5 Changed 8 years ago by dershow

I just tried to use octave with the GUI, and octave would only start command line only. It didn't give an error or anything. I tried few things and finally just rebuilt octave and now it works fine. For some reason, although I had 3.8.2_13, I think that it didn't capture the above fix. So, it was installed +gui, and I don't recall seeing any build errors, it would not open the gui. But, forcing the rebuild did fix it for me. Perhaps the resolution to this ticket should have included a rev bump as well? I am posting this, just so that if anyone else has this problem they can find this fix.

Note: See TracTickets for help on using tickets.