New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #27128 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: nerdrew@… Owned by: snc@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: sharky@…, emaguarino@…, strassh@…, mk@…, 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

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

Change History

comment:1 Changed 3 years ago by jmr@…

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

Please remember to cc the maintainers.

comment:2 Changed 3 years ago by snc@…

  • Status changed from new to assigned

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 3 years ago by nerdrew@…

Changed 3 years ago by nerdrew@…

comment:3 Changed 3 years ago by snc@…

  • Cc emaguarino@… added

Has duplicate: #27153

comment:4 Changed 3 years ago by snc@…

  • Cc strassh@… added

Has duplicate: #27133

comment:5 Changed 3 years ago by mk@…

  • Cc mk@… added

Cc Me!

comment:6 Changed 3 years ago by strassh@…

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

Thanks.

comment:7 Changed 3 years ago by macports@…

  • Cc macports@… added

Cc Me!

comment:8 Changed 3 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 3 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 3 years ago by snc@…

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 follow-up: ↓ 12 Changed 3 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 ; follow-up: ↓ 13 Changed 3 years ago by michaelld@…

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 3 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 3 years ago by michaelld@…

  • Status changed from assigned to closed
  • Resolution set to fixed

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.