Opened 14 years ago

Closed 13 years ago

#27264 closed defect (invalid)

qtoctave-mac build fails when non-MacPorts Qt is in /Library/Frameworks

Reported by: kaushal07me@… Owned by: anddam (Andrea D'Amore)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: michaelld (Michael Dickens)
Port: qtoctave-mac

Description (last modified by anddam (Andrea D'Amore))

Hi, I am trying to install qtoctave on my mac. Everything was fine except the fact that I got the following error at the last stage:

Error: Target org.macports.build returned: shell command failed (see log for details)
Log for qtoctave-mac is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.\
org_release_ports_aqua_qtoctave-mac/main.log
Error: Status 1 encountered during processing.

I looked through various tickets but could not solve the problem. Could you please direct me on how to solve the problem? thanks, Kaushal.

Attachments (2)

main.log (967.8 KB) - added by kaushal07me@… 14 years ago.
qtoctave-mac trace output.txt.gz (77.7 KB) - added by anddam (Andrea D'Amore) 14 years ago.

Download all attachments as: .zip

Change History (24)

Changed 14 years ago by kaushal07me@…

Attachment: main.log added

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: and.damore@… removed
Owner: changed from macports-tickets@… to and.damore@…
Port: qtoctave-mac added
Type: requestdefect

Please remember to fill in the Port field.

comment:2 Changed 14 years ago by anddam (Andrea D'Amore)

Status: newassigned

comment:3 Changed 14 years ago by michaelld (Michael Dickens)

Do you have a version of Qt installed in /Library/Frameworks? A way to check is do

ls -d /Library/Frameworks/Qt*

and see if that results in anything. For me, it results in:

ls: /Library/Frameworks/Qt*: No such file or directory

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

Cc: michaelld@… added

Cc Me!

comment:5 in reply to:  4 Changed 14 years ago by kaushal07me@…

Replying to michaelld@…:

Cc Me!

I tried it but I got the following error:

ls: illegal option -- /
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]

For your information, I m not a pro at using MAC but am learning to use it. What do you suspect is the problem? Is there any other way I can see if Qt is installed on my system?

Thanks!

comment:6 Changed 14 years ago by michaelld (Michael Dickens)

you can also try:

cd /Library/Frameworks
ls Qt*

and see if that produces anything.

comment:7 Changed 14 years ago by kaushal07me@…

Hi, I got the following message:

Qt3Support.framework:
Contents	Headers		Qt3Support	Qt3Support.prl	Versions

QtAssistant.framework:
Contents	Headers		QtAssistant	QtAssistant.prl	Versions

QtCore.framework:
Contents	Headers		QtCore		QtCore.prl	Versions

QtDBus.framework:
QtDBus.prl

QtDesigner.framework:
Contents	Headers		QtDesigner	QtDesigner.prl	Versions

QtDesignerComponents.framework:
Contents			QtDesignerComponents.prl
QtDesignerComponents		Versions

QtGui.framework:
Contents	QtGui		Resources
Headers		QtGui.prl	Versions

QtHelp.framework:
Contents	Headers		QtHelp		QtHelp.prl	Versions

QtMultimedia.framework:
Contents		QtMultimedia		Versions
Headers			QtMultimedia.prl

QtNetwork.framework:
Contents	Headers		QtNetwork	QtNetwork.prl	Versions

QtOpenGL.framework:
Contents	Headers		QtOpenGL	QtOpenGL.prl	Versions

QtScript.framework:
Contents	Headers		QtScript	QtScript.prl	Versions

QtScriptTools.framework:
Contents		QtScriptTools		Versions
Headers			QtScriptTools.prl

QtSql.framework:
Contents	Headers		QtSql		QtSql.prl	Versions

QtSvg.framework:
Contents	Headers		QtSvg		QtSvg.prl	Versions

QtTest.framework:
Contents	Headers		QtTest		QtTest.prl	Versions

QtWebKit.framework:
Contents	Headers		QtWebKit	QtWebKit.prl	Versions

QtXml.framework:
Contents	Headers		QtXml		QtXml.prl	Versions

QtXmlPatterns.framework:
Contents		QtXmlPatterns		Versions
Headers			QtXmlPatterns.prl

comment:8 Changed 14 years ago by michaelld (Michael Dickens)

OK; that's the main issue: CMake is finding this version of Qt instead of the one installed by MacPorts. This Qt is (I'm guessing) compiled for just i386 (so, Intel 32-bit), while what MacPorts is compiling is trying to link to x86_64 (Intel 64-bit). Any idea where this version of Qt came from? It wasn't installed by MacPorts. I think we can correct that via some extra -D flags to the configure command.

comment:9 Changed 14 years ago by anddam (Andrea D'Amore)

I had already noticed that while checking another qtoctave-mac ticket, despite cmake correctly detects Qt libraries provided by macports at configure phase, cf.

:info:configure -- Found Qt-Version 4.7.0 (using /opt/local/bin/qmake)

at build time it looks for libraries in /Library/Frameworks.

Those libraries are user installed, in my case they are i386 and ppc, thus x86_64 linking fails.

This seems the same issue a this one, I tried setting explicitly LD_LIBRARY_PATH but it's not of any help. I'm not sure how to fix this and I'll have to investigate cmake behavior.

A quick and dirty solution for end users could be to upgrade their Qt library from Nokia site. The latest Cocoa dmg is x86_64 and i386 so it should allow qtoctave-mac to build.

comment:10 Changed 14 years ago by jmroot (Joshua Root)

Description: modified (diff)

comment:11 Changed 14 years ago by anddam (Andrea D'Amore)

CMakeCache.txt that is generated in configure phase has several references to Qt3 and has the following line

QT_LIBRARY_DIR:INTERNAL=/Library/Frameworks

I'll have a look to how set up cmake to correctly configure the package.

comment:12 in reply to:  11 ; Changed 14 years ago by kaushal07me@…

Hi, Actually before using Mac-Ports I tried to install QT-Octave from the source code and it failed because of the same reason. I had installed QT 4.7, but Cmake could not recognize it and so I had uninstalled Qt 4.7 and installed Qt 4.6 which Cmake recognized quite well. But while compiling Qt-Octave from the source, C-make could not find Qt files. As I could not find the solution to that problem, I tried to install Qt-octave using Mac-Ports. This is where I think Qt came from. Now, what should I do? Thanks! Kaushal.

Replying to and.damore@…:

CMakeCache.txt that is generated in configure phase has several references to Qt3 and has the following line

QT_LIBRARY_DIR:INTERNAL=/Library/Frameworks

I'll have a look to how set up cmake to correctly configure the package.

comment:13 in reply to:  12 ; Changed 14 years ago by anddam (Andrea D'Amore)

Replying to kaushal07me@…:

Actually before using Mac-Ports I tried to install QT-Octave from the source code and it failed because of the same reason. I had installed QT 4.7, but Cmake could not recognize it

You did install by Nokia's dmgn, didn't you?

Replying to kaushal07me@…:

and so I had uninstalled Qt 4.7 and installed Qt 4.6 which Cmake recognized quite well. But while compiling Qt-Octave from the source, C-make could not find Qt files.

I've found a couple references of the same issue, Qt version mismatch when using cmake, on different systems (linux and windows) and with different versions of Qt, so this is not an OS X specific ofr Qt 4.7 specific issue.

I'm attaching the --trace cmake output as memorandum.

Changed 14 years ago by anddam (Andrea D'Amore)

comment:14 in reply to:  13 Changed 14 years ago by kaushal07me@…

Hi, I had installed Qt-4.7 using Nokia's dmg. What should I do with the --trace cmake output which you have mentioned. Kindly let me know the next steps. Thanks!

Replying to and.damore@…:

Replying to kaushal07me@…:

Actually before using Mac-Ports I tried to install QT-Octave from the source code and it failed because of the same reason. I had installed QT 4.7, but Cmake could not recognize it

You did install by Nokia's dmgn, didn't you?

Replying to kaushal07me@…:

and so I had uninstalled Qt 4.7 and installed Qt 4.6 which Cmake recognized quite well. But while compiling Qt-Octave from the source, C-make could not find Qt files.

I've found a couple references of the same issue, Qt version mismatch when using cmake, on different systems (linux and windows) and with different versions of Qt, so this is not an OS X specific ofr Qt 4.7 specific issue.

I'm attaching the --trace cmake output as memorandum.

comment:15 Changed 14 years ago by michaelld (Michael Dickens)

Please do what and.damore did: compress it (either gzip -9 or use the Finder's 'Compress' menu) & then attach it to this ticket.

comment:16 Changed 14 years ago by kaushal07me@…

I am sorry to ask such silly questions, but how do i generate the trace output for cmake? i.e what should i compress?

comment:17 Changed 14 years ago by anddam (Andrea D'Amore)

Description: modified (diff)

Just to be clear I'm not requesting any --trace output, I attached one as memorandum for myself.

FYI to get such an output you have to add the following line to Portfile

configure.pre_args-append   --trace

The path of Portfile is returned by port dir qtoctave-mac command, you may also use port edit qtoctave-mac to directly edit the Portfile but according to file ownership/default editor in env variable you may need sudo for the latter.

comment:18 Changed 14 years ago by kaushal07me@…

Hi, actually I am losing days at work without doing anything. So, to make things easy I would like to know if there's a possibility to uninstall Qt-octave & Qt using macports and then install it again using macports. Is it also required to uninstall C-make? What are your views on this?

comment:19 in reply to:  18 ; Changed 14 years ago by anddam (Andrea D'Amore)

Replying to kaushal07me@…:

Hi, actually I am losing days at work without doing anything.

I'm not sure if that's qtoctave related, qtoctave is just a frontend so you should be able to do anything you need with octave's cli.

So, to make things easy I would like to know if there's a possibility to uninstall Qt-octave & Qt using macports and then install it again using macports. Is it also required to uninstall C-make? What are your views on this?

From what I could get (I'm really new to cmake myself) the problem is FindQt4 cmake module find the old Qt thus creating -F and -framework flags while macports' Qt is installed using regular *NIX hierarchy so programs linking against it need -L and -l.

I simply removed the Qt* folders from /Library/Frameworks, they are not part of the standard system and on my system they were old anyway, they were 4.0 Qt with ppc and i386 arch only. Removing those frameworks makes it possible to use macports libraries.

I just commited a patch for a file conflict in r73529, cf. this bug, so run a selfupdate, a clean, move your Qt frameworks out of /Library/Frameworks ~/Library/Frameworks and qtoctave-mac should compile.

The ticket is still open as I want to check if there's an option to disable -framework recognition by cmake.

comment:20 in reply to:  19 Changed 13 years ago by jmroot (Joshua Root)

Replying to and.damore@…:

The ticket is still open as I want to check if there's an option to disable -framework recognition by cmake.

Are you still working on this? Is the main problem reported in this ticket fixed?

comment:21 Changed 13 years ago by anddam (Andrea D'Amore)

This ticket explain all that cmake digging I did a few months ago.

I couldn't patch the cmake and eventually lost interest in this.

The main problem was never strictly related to mp, I suggested that dirty fix upward but I never heard back from the reporter.

I'm not sure how to close it, should it be wontfix, worksforme (I can't reproduce it), fixed (dirty way) or invalid (non mp-related)?

comment:22 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: assignedclosed
Summary: [qtoctave-mac ] [0.9.1] [Status 1 encountered during processing.]qtoctave-mac build fails when non-MacPorts Qt is in /Library/Frameworks

Invalid because it was caused by user-installed 3rd-party libraries. Resolution is for user to uninstall those manually-installed libraries, then MacPorts software will work properly.

Note: See TracTickets for help on using tickets.