Opened 10 years ago

Last modified 10 years ago

#42673 new defect

kde4-baseapps build failure on OS X 10.6.8

Reported by: RJVB (René Bertin) Owned by: NicosPavlov
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: mkae (Marko Käning)
Port: kde4-baseapps

Description

I have stumbled across 2 build failures of the kde4baseapps port on Mac OS X 10.6.8. The 1st failure concerns the linking stage of dolphin.app and consists of the linker not finding the TerminalPanel base class that resides in panel.o linked into libkdeinit4_dolphin.dylib, despite the fact that that library is pulled in by the linker.

When complete the dolphin.app linking stage by hand, adding panel.o to the arguments, the link completes fine. However, a bit later on there occurs a duplicate symbol error, apparently because a konqmisc.o is pulled in twice.

Both failures occur with both the default compiler (/usr/bin/clang, from Xcode 4) and with gcc-mp-4.7 .

Attachments (3)

kde4baseapp-fail1.log (2.9 MB) - added by RJVB (René Bertin) 10 years ago.
link failure because Panel class not found
main.log (790.8 KB) - added by RJVB (René Bertin) 10 years ago.
build failure because of duplicate symbol
main.2.log (959.4 KB) - added by RJVB (René Bertin) 10 years ago.
build log using configure.compiler=gcc-4.2

Change History (17)

Changed 10 years ago by RJVB (René Bertin)

Attachment: kde4baseapp-fail1.log added

link failure because Panel class not found

Changed 10 years ago by RJVB (René Bertin)

Attachment: main.log added

build failure because of duplicate symbol

comment:1 Changed 10 years ago by larryv (Lawrence Velázquez)

Keywords: class not found duplicate symbol removed
Owner: changed from macports-tickets@… to nicos@…
Port: kde4-baseapps added; kde4baseapps removed
Summary: kde4baseapps build failure on OS X 10.6.8kde4-baseapps build failure on OS X 10.6.8

comment:2 Changed 10 years ago by NicosPavlov

I am not able to reproduce these errors, but I am not on 10.6, and the 10.6 buildbot still uses gcc-4.2, and not clang.

One thing I noticed from your logs is that the objects list is rather different from my system. For the dolphin executable, your configuration uses three objects to link: dolphin_dummy.o, dolphin_automoc.o, and terminalpanel.o. In my case (10.9.2, Clang 5.0) only dophin_dummy.o is used, while the two others are linked for libkdeinit4_dolphin.dylib.

Then, the error with konqmisc.o is due to the fact that it is manually added in the Portfile:

pre-build {
    # Add missing object files manually. Issue similar to ticket #37574.
    #(Should be in libkdeinit4_konqueror, but do not link)
    reinplace "s|-o|CMakeFiles/kdeinit_konqueror.dir/konqmisc.o -o|g" \
        ${workpath}/build/konqueror/src/CMakeFiles/konqueror.dir/link.txt
}

as this object was missing at linking time according to my tests. This means that in your configuration, you have other objects missing, but the one I identified as missing according to my tests is present. The first solution would be to suppress the lines above in your kde4-baseapps portfile, try to rebuild, link manually dolphin, and the error with konqmisc should not be present, as it would not be added manually, but this starts to be quite cumbersome.

Another solution would be to try to build kde4-baseapps with gcc-4.2, as this one is confirmed to work on the buildbot:

sudo port install kde4-baseapps configure.compiler=gcc-4.2

to use the same compiler as the buildbot. If this works, this would mean that I may have to blacklist older versions of clang with this port.

comment:3 Changed 10 years ago by RJVB (René Bertin)

I'm more likely to try a build with gcc-4.2, in hope it won't be blacklisted by KDE itself (IIRC, Qt4 refuses to build with gcc < 4.4.

It'll have to wait a bit though, as I uninstalled most of KDE's dependencies after earlier replies suggesting that the K experience wouldn't be as I'd hope anyway - and I'm using my system for other intensive stuff right now.

There wouldn't be a way to have MacPorts use an already installed Qt4 set-up, would there ... or build an X11 variant (I understand from the pkgsrc people that KDE works better on Darwin/X11 than natively, despite the obvious integration issues)?

comment:4 Changed 10 years ago by RJVB (René Bertin)

OK, I've found some time to look at this again.

First off, kde4-baseapps doesn't use gcc-4.2, but clang, even on 10.6 . Maybe because I have an XCode 4 version installed, who knows. When I use configure.compiler=gcc-4.2 I'm getting the same issue as I reported earlier: the Panel class is not found when linking dolphin.app, and konqueror gets a duplicate file at link time. I'm going to see if I can get any further by hand...

I must add that I installed qt4-mac and kdelibs4 in individual invocations of the port command, without specifying a compiler. I know I got gcc-4.2 for qt4-mac, but how could I verify what compiler was used for kdelibs4?

Last edited 10 years ago by RJVB (René Bertin) (previous) (diff)

Changed 10 years ago by RJVB (René Bertin)

Attachment: main.2.log added

build log using configure.compiler=gcc-4.2

comment:5 in reply to:  2 Changed 10 years ago by RJVB (René Bertin)

I had to modify the Portfile a bit:

pre-build {
    # Add missing object files manually. Issue similar to ticket #37574.
    #(Should be in libkdeinit4_konqueror, but do not link)
    reinplace "s|konqmain.o  -o|CMakeFiles/kdeinit_konqueror.dir/konqmisc.o -o|g" \
        ${workpath}/build/konqueror/src/CMakeFiles/konqueror.dir/link.txt
}

because otherwise konqmisc.o was added TWICE to the link command. Took me a while to figure out how to do this, because contrary to dolphin, linking konqueror by hand was useless as port install would try again with the wrong parameters. And NOT adding konqmisc.o isn't an option either because then the class isn't found, even with gcc-4.2 .

comment:6 in reply to:  4 Changed 10 years ago by NicosPavlov

Replying to rjvbertin@…:

First off, kde4-baseapps doesn't use gcc-4.2, but clang, even on 10.6 . Maybe because I have an XCode 4 version installed, who knows.

Yes, your version of XCode implies that your default compiler is clang. The point I am trying to make by proposing to force using gcc-4.2 is to be closer to the configuration of the build bot for 10.6, which is still using an older version of Xcode with this compiler, and which builds kde4-baseapps correctly with the Portfile as it is.

I must add that I installed qt4-mac and kdelibs4 in individual invocations of the port command, without specifying a compiler. I know I got gcc-4.2 for qt4-mac, but how could I verify what compiler was used for kdelibs4?

I am not sure that you can confirm it, but if you did not specify any compiler, it should have used your default one (clang), as there is not compiler directive in kdelibs4 portfile. However, the errors you report do not seem to be due to that.

Concerning the part of the portfile you pasted, it is the same one as what I pasted just above. This object is missing in all configurations I could test (but not the one of dolphin), but is present in your case, so that this manual addition makes indeed duplicates.

comment:7 Changed 10 years ago by mkae (Marko Käning)

Just installed this on 10.6.8 via buildbot's binaries SUCCESSFULLY.

So, is this already a non-issue?

comment:8 Changed 10 years ago by RJVB (René Bertin)

No, I fear it's not. I just tried

port destroot kde4-baseapps

to see what it'd would do (given that my baseapps port is uptodate). First, I had to reinstall akonadi without mysql5 because otherwise MacPorts wanted to install qt4-mac-mysql51-plugin which is incompatible with the already installed qt4-mac-mysql5-plugin port (a glitch in an update path?) - but that's a different issue.

Then, MacPorts still didn't want to install (or couldn't find) a binary, pre-built kde4-baseapps package, so started to build from source. Using Apple's clang 3.0, it failed with the already known error copied below. It's now building again with configure.compiler=gcc-4.2, we'll see how that goes.

:info:build cd /opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4
-baseapps/kde4-baseapps/work/build/dolphin/src && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/dolphin.dir/link.txt --verbos
e=1
:info:build /usr/bin/clang++   -Os -arch x86_64  -fno-common -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscript
s -Wall -W -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-common -fvisibility=hidden -Werror=return-type -fvisibility-i
nlines-hidden -Wno-return-type-c-linkage -O2 -DNDEBUG -DQT_NO_DEBUG -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-v
ersion-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -Wl,-headerpad_max_install_names -arch x86_64 CMakeFiles/d
olphin.dir/dolphin_automoc.o CMakeFiles/dolphin.dir/dolphin_dummy.o CMakeFiles/dolphin.dir/panels/terminal/terminalpanel.o  -o dolph
in.app/Contents/MacOS/dolphin  -L/opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_rele
ase_ports_kde_kde4-baseapps/kde4-baseapps/work/build/lib  -L/opt/local/lib  ../../lib/libkdeinit4_dolphin.dylib ../../lib/libdolphin
private.4.12.4.dylib ../../lib/libkonq.5.12.4.dylib /opt/local/lib/libkfile.4.12.4.dylib /opt/local/lib/libkcmutils.4.12.4.dylib /op
t/local/lib/libkparts.4.12.4.dylib -lknewstuff3 /opt/local/lib/libphonon.dylib /opt/local/lib/libnepomukwidgets.4.12.4.dylib /opt/lo
cal/lib/libnepomukcore.4.12.4.dylib /opt/local/lib/libkio.5.12.4.dylib /opt/local/lib/libsolid.4.12.4.dylib /opt/local/lib/libnepomu
kutils.4.12.4.dylib /opt/local/lib/libQtNetwork.dylib /opt/local/lib/libQtXml.dylib /opt/local/lib/libnepomuk.4.12.4.dylib /opt/local/lib/libkdeui.5.12.4.dylib /opt/local/lib/libQtGui.dylib /opt/local/lib/libQtSvg.dylib /opt/local/lib/libsoprano.dylib /opt/local/lib/libkactivities.6.2.0.dylib /opt/local/lib/libkdecore.5.12.4.dylib /opt/local/lib/libQtCore.dylib /opt/local/lib/libQtDBus.dylib -framework Carbon -Wl,-rpath,/opt/local/lib 
:info:build ld: duplicate symbol __ZN8KonqMisc19abortFullScreenModeEv in CMakeFiles/kdeinit_konqueror.dir/konqmisc.o and CMakeFiles/kdeinit_konqueror.dir/konqmisc.o
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [konqueror/src/konqueror.app/Contents/MacOS/konqueror] Error 1
:info:build make[2]: Leaving directory `/Volumes/Debian/MacPorts/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build'
:info:build make[1]: *** [konqueror/src/CMakeFiles/konqueror.dir/all] Error 2
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build Undefined symbols:
:info:build   "__ZN5Panel16staticMetaObjectE", referenced from:
:info:build       __ZN13TerminalPanel16staticMetaObjectE in terminalpanel.o
:info:build   "__ZN5PanelD2Ev", referenced from:
:info:build       __ZN13TerminalPanelC2EP7QWidget in terminalpanel.o
:info:build       __ZN13TerminalPanelD2Ev in terminalpanel.o
:info:build       __ZN13TerminalPanelD2Ev in terminalpanel.o
:info:build   "__ZN5Panel11qt_metacastEPKc", referenced from:
:info:build       __ZN13TerminalPanel11qt_metacastEPKc in terminalpanel.o
:info:build   "__ZNK5Panel3urlEv", referenced from:
:info:build       __ZN13TerminalPanel10urlChangedEv in terminalpanel.o
:info:build       __ZN13TerminalPanel10urlChangedEv in terminalpanel.o
:info:build       __ZN13TerminalPanel9showEventEP10QShowEvent in terminalpanel.o
:info:build       __ZN13TerminalPanel9showEventEP10QShowEvent in terminalpanel.o
:info:build       __ZN13TerminalPanel38slotKonsolePartCurrentDirectoryChangedERK7QString in terminalpanel.o
:info:build   "__ZTI5Panel", referenced from:
:info:build       __ZTI13TerminalPanel in terminalpanel.o
:info:build   "__ZN5PanelC2EP7QWidget", referenced from:
:info:build       __ZN13TerminalPanelC2EP7QWidget in terminalpanel.o
:info:build   "__ZNK5Panel8sizeHintEv", referenced from:
:info:build       __ZTV13TerminalPanel in terminalpanel.o
:info:build   "__ZN5Panel11qt_metacallEN11QMetaObject4CallEiPPv", referenced from:
:info:build       __ZN13TerminalPanel11qt_metacallEN11QMetaObject4CallEiPPv in terminalpanel.o
:info:build   "__ZN5Panel12readSettingsEv", referenced from:
:info:build       __ZTV13TerminalPanel in terminalpanel.o
:info:build ld: symbol(s) not found
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [dolphin/src/dolphin.app/Contents/MacOS/dolphin] Error 1
:info:build make[2]: Leaving directory `/Volumes/Debian/MacPorts/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build'
:info:build make[1]: *** [dolphin/src/CMakeFiles/dolphin.dir/all] Error 2
:info:build make[1]: Leaving directory `/Volumes/Debian/MacPorts/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/Volumes/Debian/MacPorts/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build" && /usr/bin/make -j4 -w all 
:info:build Exit code: 2
:error:build org.macports.build for port kde4-baseapps returned: command execution failed
:debug:build Error code: CHILDSTATUS 18022 2
:debug:build Backtrace: command execution failed

comment:9 Changed 10 years ago by RJVB (René Bertin)

And building with gcc-4.2 gives the same error:

:info:build Linking CXX executable dolphin.app/Contents/MacOS/dolphin
:info:build cd /opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4
-baseapps/kde4-baseapps/work/build/dolphin/src && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/dolphin.dir/link.txt --verbos
e=1
:info:build /usr/bin/g++-4.2   -Os -arch x86_64  -fno-common -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscript
s -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fvi
sibility=hidden -Werror=return-type -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG -arch x86_64 -isysroot /Developer/SDKs/Ma
cOSX10.6.sdk -mmacosx-version-min=10.6 -Wl,-search_paths_first -Wl,-headerpad_max_install_names  -Wl,-headerpad_max_install_names -a
rch x86_64 CMakeFiles/dolphin.dir/dolphin_automoc.o CMakeFiles/dolphin.dir/dolphin_dummy.o CMakeFiles/dolphin.dir/panels/terminal/te
rminalpanel.o  -o dolphin.app/Contents/MacOS/dolphin  -L/opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_
rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build/lib  ../../lib/libkdeinit4_dolphin.dylib ../../lib/libdo
lphinprivate.4.12.4.dylib ../../lib/libkonq.5.12.4.dylib /opt/local/lib/libkfile.4.12.4.dylib /opt/local/lib/libkcmutils.4.12.4.dyli
b /opt/local/lib/libkparts.4.12.4.dylib -lknewstuff3 /opt/local/lib/libphonon.dylib /opt/local/lib/libnepomukwidgets.4.12.4.dylib /o
pt/local/lib/libnepomukcore.4.12.4.dylib /opt/local/lib/libkio.5.12.4.dylib /opt/local/lib/libsolid.4.12.4.dylib /opt/local/lib/libn
epomukutils.4.12.4.dylib /opt/local/lib/libQtNetwork.dylib /opt/local/lib/libQtXml.dylib /opt/local/lib/libnepomuk.4.12.4.dylib /opt
/local/lib/libkdeui.5.12.4.dylib /opt/local/lib/libQtGui.dylib /opt/local/lib/libQtSvg.dylib /opt/local/lib/libsoprano.dylib /opt/lo
cal/lib/libkactivities.6.2.0.dylib /opt/local/lib/libkdecore.5.12.4.dylib /opt/local/lib/libQtCore.dylib /opt/local/lib/libQtDBus.dy
lib -framework Carbon -Wl,-rpath,/opt/local/lib 
:info:build ld: duplicate symbol KonqMisc::abortFullScreenMode()      in CMakeFiles/kdeinit_konqueror.dir/konqmisc.o and CMakeFiles/
kdeinit_konqueror.dir/konqmisc.o
:info:build collect2: ld returned 1 exit status
:info:build make[2]: *** [konqueror/src/konqueror.app/Contents/MacOS/konqueror] Error 1
:info:build make[2]: Leaving directory `/Volumes/Debian/MacPorts/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rs
ync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build'
:info:build make[1]: *** [konqueror/src/CMakeFiles/konqueror.dir/all] Error 2
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build Undefined symbols:
:info:build   "Panel::staticMetaObject", referenced from:
:info:build       TerminalPanel::staticMetaObject        in terminalpanel.o
:info:build   "Panel::~Panel()", referenced from:
:info:build       TerminalPanel::~TerminalPanel()in terminalpanel.o
:info:build       TerminalPanel::~TerminalPanel()in terminalpanel.o
:info:build   "Panel::qt_metacast(char const*)", referenced from:
:info:build       TerminalPanel::qt_metacast(char const*)in terminalpanel.o
:info:build   "Panel::url() const", referenced from:
:info:build       TerminalPanel::slotKonsolePartCurrentDirectoryChanged(QString const&)  in terminalpanel.o
:info:build       TerminalPanel::urlChanged()       in terminalpanel.o
:info:build       TerminalPanel::urlChanged()       in terminalpanel.o
:info:build       TerminalPanel::showEvent(QShowEvent*)       in terminalpanel.o
:info:build       TerminalPanel::showEvent(QShowEvent*)       in terminalpanel.o
:info:build   "typeinfo for Panel", referenced from:
:info:build       typeinfo for TerminalPanelin terminalpanel.o
:info:build   "Panel::Panel(QWidget*)", referenced from:
:info:build       TerminalPanel::TerminalPanel(QWidget*)in terminalpanel.o
:info:build   "Panel::sizeHint() const", referenced from:
:info:build       vtable for TerminalPanelin terminalpanel.o
:info:build   "Panel::qt_metacall(QMetaObject::Call, int, void**)", referenced from:
:info:build       TerminalPanel::qt_metacall(QMetaObject::Call, int, void**)in terminalpanel.o
:info:build   "Panel::readSettings()", referenced from:
:info:build       vtable for TerminalPanelin terminalpanel.o
:info:build ld: symbol(s) not found
:info:build collect2: ld returned 1 exit status
:info:build make[2]: *** [dolphin/src/dolphin.app/Contents/MacOS/dolphin] Error 1
:info:build make[2]: Leaving directory `/Volumes/Debian/MacPorts/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4-baseapps/kde4-baseapps/work/build'
:info:build make[1]: *** [dolphin/src/CMakeFiles/dolphin.dir/all] Error 2

In other words, there are still 2 open questions:

  • why does my MacPorts not use the prebuilt binary package? (maybe that's normal when doing port destroot?)
  • how come the buildbots succeed to build the package in what's presumably the same or at least a highly similar environment as I have, and if that's because of some Portfile hacking, why don't I get that same Portfile?

comment:10 in reply to:  8 Changed 10 years ago by NicosPavlov

Replying to rjvbertin@…:

No, I fear it's not. I just tried

port destroot kde4-baseapps

Then, MacPorts still didn't want to install (or couldn't find) a binary, pre-built kde4-baseapps package, so started to build from source. Using Apple's clang 3.0, it failed with the already known error copied below. It's now building again with configure.compiler=gcc-4.2, we'll see how that goes.

Port destroot is an intermediate command meant for developers when testing. I think it will trigger the use of source automatically.

comment:11 in reply to:  9 ; Changed 10 years ago by NicosPavlov

In other words, there are still 2 open questions:

  • why does my MacPorts not use the prebuilt binary package? (maybe that's normal when doing port destroot?)

Destroot should trigger the use of source directly, I think. The other thing is:

:info:build cd /opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4

From this line, it seems to me that you are using an additional Portfiles directory. It is not likely, but depending on your install, it may prevent the use of binaries.

  • how come the buildbots succeed to build the package in what's presumably the same or at least a highly similar environment as I have, and if that's because of some Portfile hacking, why don't I get that same Portfile?

No, the Portfiles should be the same, as changes should only occur through rsync. I admit that this problem is rather puzzling, as neither I nor the bots can reproduce it. And as far as I can be aware, there has been no other report of this issue.

comment:12 in reply to:  11 Changed 10 years ago by RJVB (René Bertin)

Replying to nicos@…:

Destroot should trigger the use of source directly, I think. The other thing is:

:info:build cd /opt/local/var/macports/build/_Volumes_Debian_MacPorts_var_macports_sources_rsync.macports.org_release_ports_kde_kde4

From this line, it seems to me that you are using an additional Portfiles directory. It is not likely, but depending on your install, it may prevent the use of binaries.

This has always stymied me a bit. My /opt/local is a symlink to /Volumes/Debian/MacPorts (the partition name just stuck :) ), and AFAIK there's nothing in macports.conf that tells MacPorts that this is the case. Somewhere it does a symlink normalisation, but in any case I'm not using an additional Portfiles directory. Some ports install from prebuilt binaries, others are always rebuilt from source, and I've never yet tried to understand why (apart from the ports where the answer is obvious, like ffmpeg with non-free contributions).

I admit that this problem is rather puzzling, as neither I nor the bots can reproduce it. And as far as I can be aware, there has been no other report of this issue.

As long as there's a binary build for 10.6 it's just that, a puzzle ... and I hope it'll remain that way!

comment:13 Changed 10 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:14 Changed 10 years ago by NicosPavlov

This does not answer to the question of why these specific missing objects, which are different from the ones experienced on the buildbot, occurred, but the recently committed patch to kdelibs4 (see #43720) should solve these types of problems.

Note: See TracTickets for help on using tickets.