Opened 14 years ago

Closed 14 years ago

#27128 closed defect (fixed)

kdelibs4 fails to build with older qt in /Library/Frameworks

Reported by: nerdrew@… Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: sharky@…, emaguarino@…, strassh@…, mkae (Marko Käning), macports@…
Port: kdelibs4

Description

I have Qt installed for macports and separately in /Library/Frameworks. kdelibs4 incorrectly tries to use the /Library/Frameworks version instead of the macports version. Any non-macports version should be ignored. For the most recent kdelibs4 (4.5.2) I had Qt 4.5 installed in /Library/Frameworks and Qt 4.7 in macports. kdelibs4 failed to build because it was using the Qt 4.5 from /Library/Frameworks.

Attachments (2)

CMakeCache.txt (105.3 KB) - added by nerdrew@… 14 years ago.
main.log.gz (192.9 KB) - added by nerdrew@… 14 years ago.

Download all attachments as: .zip

Change History (16)

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

Cc: sharky@… added
Owner: changed from macports-tickets@… to snc@…
Summary: kdelibs4 fails to build with older external qtkdelibs4 fails to build with older qt in /Library/Frameworks

Please remember to cc the maintainers.

comment:2 Changed 14 years ago by nerdling (Jeremy Lavergne)

Status: newassigned

Can you post your port dir kdelibs4/work/build/CMakeCache.txt file? I can use it quickly find the variables that need set. Thanks.

Changed 14 years ago by nerdrew@…

Attachment: CMakeCache.txt added

Changed 14 years ago by nerdrew@…

Attachment: main.log.gz added

comment:3 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: emaguarino@… added

Has duplicate: #27153

comment:4 Changed 14 years ago by nerdling (Jeremy Lavergne)

Cc: strassh@… added

Has duplicate: #27133

comment:5 Changed 14 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:6 Changed 14 years ago by strassh@…

Ok, I uninstalled my Qt installation and the build of kdelibs4 succeeded.

Thanks.

comment:7 Changed 14 years ago by macports@…

Cc: macports@… added

Cc Me!

comment:8 Changed 14 years ago by macports@…

Even after uninstalling the external Qt, building kdelibs4 failed for me because it tries to link against "/Library/Frameworks/phonon" (which does not exist). My workaround was to replace all occurrences of "-framework phonon" with "/opt/local/lib/libphonon.dylib" in all link.txt files.

cd  /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_kdelibs4/work/build/
grep -rl "framework phonon" * | xargs sed -i '' 's/ -framework phonon//'

this will change: interfaces/kmediaplayer/kfileaudiopreview/CMakeFiles/kfileaudiopreview.dir/link.txt, khtml/CMakeFiles/khtml.dir/link.txt, knotify/config/CMakeFiles/knotifyconfig.dir/link.txt and plasma/CMakeFiles/plasma.dir/link.txt

I'm using qt4-mac@4.7.1 together with phonon@4.4.2 which does not seem to create a framework of phonon any longer (as imho older Qt versions did). At least I was able to compile kdelibs4 successfully, not yet tested if this will work, though.

comment:9 Changed 14 years ago by macports@…

To successfully replace framework with libphonon.dylib the above command must be:

grep -rl "framework phonon" * | xargs sed -i '' 's/ -framework phonon/ \/opt\/local\/lib\/libphonon.dylib/'

Sorry.

comment:10 Changed 14 years ago by nerdling (Jeremy Lavergne)

Some changes were pushed in r74224 to address this, which worked for michaelld. Can you verify that they work for you as well?

comment:11 Changed 14 years ago by macports@…

I can confirm that compiling kdelibs4 works for me, now (no Qt installed in /Library/Frameworks)

comment:12 in reply to:  11 ; Changed 14 years ago by michaelld (Michael Dickens)

Replying to macports@…:

I can confirm that compiling kdelibs4 works for me, now (no Qt installed in /Library/Frameworks)

And, with no other hackery on your part -- just the current Portfiles of the various projects and dependencies?

I have Nokia's Qt installed into /Library/Frameworks, as well as a few other projects that are known to compete for resouces -- intentionally to figure out ways around using them -- and all of the KDE ports that we've worked on in the last few days work for me w/o using those Frameworks (libraries / headers / resources). So, hopefully the same will hold for others.

Can anyone else verify that kdelibs4 now work for them (in the sense of this ticket's issue -- finds MacPorts' qt4-mac instead of Nokia's or Fink's)?

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

Replying to michaelld@…:

And, with no other hackery on your part -- just the current Portfiles of the various projects and dependencies?

Yes, no hackery on my part (unfortunately kdeinit4 from kdelibs4 4.5.4 fails to start so I switched back to 4.5.3, see #21973)

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

Resolution: fixed
Status: assignedclosed

OK; so the issue of this ticket has been fixed so I'm closing this ticket. Let's hope the related issue in ticket #21973 can now be resolved easily / quickly.

Note: See TracTickets for help on using tickets.