Opened 12 years ago

Last modified 12 years ago

#34545 closed defect

Can't install kdevplatform — at Version 7

Reported by: dave@… Owned by: nicos@…
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc:
Port: kdevplatform

Change History (9)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to nicos@…

This was not a clean attempt. Please "sudo port clean kdevplatform" and try again, then attach the new main.log.

Changed 12 years ago by dave@…

Attachment: main.log added

clean build log

comment:2 Changed 12 years ago by dragan.glumac@…

There's definitely an issue with CXX compiler for this if you're using OS X Lion and Xcode 4.3 (latest and "greatest" version 4.3.2 :-S).

If I use clang to build kdevplatform I can get past this problem, but then I get tripped up further down the line by a #include of unordered_map which for some reason clang cannot see since it's an early-style STL header (on my system it lives in /usr/include/c++/v1/).

If I use llvm-g++-4.2 then I get the same problem that is listed in this ticket (and a few earlier ones).

This is what I did to build with clang:

1) sudo port clean kdevplatform 2) sudo port fetch kdevplatform 3) sudo port extract kdevplatform 4) cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/kde/kdevplatform/work/build 5) sudo cmake ../kdevplatform-1.3.1/ --> this at least on my system forces clang to be the CXX compiler. I guess you can explicitly set it to clang by passing -D CMAKE_CXX_COMPILER=clang as an argument to cmake 6) sudo make

And then I get tripped up by the #include <unordered_map>.

''[  7%] Building CXX object language/CMakeFiles/kdevplatformlanguage.dir/editor/modificationrevision.o
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_kde_kdevplatform/kdevplatform/work/kdevplatform-1.3.1/language/editor/modificationrevision.cpp:36:10: fatal error: 
      'unordered_map' file not found
#include <unordered_map>
         ^
1 error generated.
''

Clang doesn't seem to see it by default and I haven't got round to figuring out how to add a library import to CMakeCXXCompiler.cmake file.

I hope this helps.

comment:3 Changed 12 years ago by dragan.glumac@…

Sorry about the formatting above, here are the steps laid out in a more readable fashion

1) sudo port clean kdevplatform
2) sudo port fetch kdevplatform
3) sudo port extract kdevplatform
4) cd /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/kde/kdevplatform/work/build
5) sudo cmake ../kdevplatform-1.3.1/ --> this at least on my system forces clang to be the CXX compiler. I guess you can explicitly set it to clang by passing -D CMAKE_CXX_COMPILER=clang as an argument to cmake
6) sudo make

comment:4 Changed 12 years ago by dave@…

Yeah, I got as far as dragan did with clang, and stopped there. Actually, <unordered_map> is available in C++11, so probably you just need to enable the C++11 option to Clang.

comment:5 Changed 12 years ago by dave@…

With the following cmake command you can get all the way to link errors:

sudo port install clang-3.1
sudo cmake "-DCMAKE_CXX_COMPILER=$(which clang-mp-3.1)" "-DCMAKE_CXX_FLAGS=-std=c++11 -Wno-reserved-user-defined-literal" ../kdevplatform-1.3.1

It seems to be missing the runtime libraries for something (see my attachment). It's my wild guess that kdelibs4 and any other parts on which kdevelop depends need to be built with clang, too. Maybe someone else can get further than I.

Changed 12 years ago by dave@…

Attachment: ld-fail.log added

Link errors

comment:6 Changed 12 years ago by dave@…

BTW, if someone with the privileges to do so could edit out the body of the bug report (which is superseded by my attached log) I would be grateful.

comment:7 Changed 12 years ago by mf2k (Frank Schima)

Description: modified (diff)

Done.

Note: See TracTickets for help on using tickets.