| Summary: | Build issue: tdebase FTBFS - kcontrol_tdeinit_executable.cpp undefined reference to `kdemain' | ||
|---|---|---|---|
| Product: | TDE | Reporter: | David C. Rankin <trin> |
| Component: | tdebase | Assignee: | Timothy Pearson <kb9vqf> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | bugwatch, darrella, slavek.banko, trin |
| Priority: | P5 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
Additional research disclosed this exact issue surfaced here: http://trinity-users.pearsoncomputing.net/?0::2661 However in my case ALL components have been built from the git tree and in order. Looking at the out-of-source build dir, the cmake file that is failing is: /build/kcontrol/kcontrol/kcontrol_tdeinit_executable.cpp The contents are: extern "C" int kdemain(int argc, char* argv[]); int main(int argc, char* argv[]) { return kdemain(argc,argv); } Looking at the only other cpp file in the build directory, kcontrol_tdeinit_module.cpp, it's contents are: #include <kdemacros.h> extern "C" int kdemain(int argc, char* argv[]); extern "C" KDE_EXPORT int tdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); } So it almost looks like there is an 'extern "C"' missing from kcontrol_tdeinit_executable.cpp. What say the masters? old but possibly on point kde bug: https://bugs.kde.org/show_bug.cgi?id=93347 (In reply to comment #2) > old but possibly on point kde bug: > > https://bugs.kde.org/show_bug.cgi?id=93347 THAT'S IT!!! removing: -DWITH_GCC_VISIBILITY=ON \ allows tdebase to continue building. That still means there are issues in tdebase that need fixing, but 4 hours later (and tired of searching) we at least know what the heck it is! (thanks to a 2004 bug report -- a decade ago) Bumped from Blocker to Major as building with WITH_GCC_VISIBILITY=OFF will allow the build to proceed in this case on Arch. If others find the same problem and are unable to modify WITH_GCC_VISIBILITY and build re-elevate to Blocker. How did you build tdelibs - you had WITH_GCC_VISIBILITY turned ON? At what value is set __KDE_HAVE_GCC_VISIBILITY in kdemacros.h (line 24) created by building tdelibs? (In reply to comment #5) > How did you build tdelibs - you had WITH_GCC_VISIBILITY turned ON? At what > value is set __KDE_HAVE_GCC_VISIBILITY in kdemacros.h (line 24) created by > building tdelibs? /* #undef __KDE_HAVE_GCC_VISIBILITY */ I see what happened. It is an all or nothing. You either build everything starting with (what?) with -DWITH_GCC_VISIBILITY=ON or you don't use it at all. What is the first module you must start with? Also, shouldn't we add a check in the CMake files that tests if WITH_GCC_VISIBILITY=ON, check __KDE_HAVE_GCC_VISIBILITY, if not, then throw "Error: Can't use WITH_GCC_VISIBILITY=ON"? (Odpověď na komentář #6)
> (In reply to comment #5)
> > How did you build tdelibs - you had WITH_GCC_VISIBILITY turned ON? At what
> > value is set __KDE_HAVE_GCC_VISIBILITY in kdemacros.h (line 24) created by
> > building tdelibs?
>
> /* #undef __KDE_HAVE_GCC_VISIBILITY */
>
> I see what happened. It is an all or nothing. You either build everything
> starting with (what?) with -DWITH_GCC_VISIBILITY=ON or you don't use it at all.
> What is the first module you must start with?
>
> Also, shouldn't we add a check in the CMake files that tests if
> WITH_GCC_VISIBILITY=ON, check __KDE_HAVE_GCC_VISIBILITY, if not, then throw
> "Error: Can't use WITH_GCC_VISIBILITY=ON"?
Yes, it is. If tdelibs was not built with WITH_GCC_VISIBILITY="ON" is not possible to build other modules with WITH_GCC_VISIBILITY="ON". Verification WITH_GCC_VISIBILITY="ON" along with __KDE_HAVE_GCC_VISIBILITY is a good idea!
>Verification WITH_GCC_VISIBILITY="ON" along with __KDE_HAVE_GCC_VISIBILITY is a > good idea! I agree. To my understanding, visibility is automatically built into tqt3. arts, tdelibs, and tdebase are the only modules where ON is explicitly supported. Other modules have the same configuration option but are not yet implemented. I ran into that discovery a few months ago. I remember Tim mentioning long ago that support does not exist in other modules. That is why we created bug 1285. Fixed in commit 69da674b (tdebase). |
Building tdebase on Arch with NO patches applied, I get the following FTBFS: [ 8%] Building CXX object kcontrol/kcontrol/CMakeFiles/tdeinit_kcontrol-shared.dir/modules.cpp.o /build/tde-tdebase/src/tdebase/kcontrol/kcontrol/modules.cpp: In member function 'ProxyWidget* ConfigModule::module()': /build/tde-tdebase/src/tdebase/kcontrol/kcontrol/modules.cpp:69:40: warning: 'bool TDECModuleInfo::isHiddenByDefault() const' is deprecated (declared at /opt/trinity/include/tdecmoduleinfo.h:179) [-Wdeprecated-declarations] if (run_as_root && isHiddenByDefault()) ^ /build/tde-tdebase/src/tdebase/kcontrol/kcontrol/modules.cpp:72:53: warning: 'static TDECModule* TDECModuleLoader::loadModule(const TDECModuleInfo&, bool, TQWidget*, const char*, const TQStringList&)' is deprecated (declared at /opt/trinity/include/tdecmoduleloader.h:63) [-Wdeprecated-declarations] modWidget = TDECModuleLoader::loadModule(*this); ^ [ 8%] Building CXX object kcontrol/kcontrol/CMakeFiles/tdeinit_kcontrol-shared.dir/proxywidget.cpp.o [ 8%] Building CXX object kcontrol/kcontrol/CMakeFiles/tdeinit_kcontrol-shared.dir/kcrootonly.cpp.o [ 8%] Building CXX object kcontrol/kcontrol/CMakeFiles/tdeinit_kcontrol-shared.dir/searchwidget.cpp.o Linking CXX shared library libtdeinit_kcontrol.so [ 8%] Built target tdeinit_kcontrol-shared Scanning dependencies of target kcontrol [ 8%] Building CXX object kcontrol/kcontrol/CMakeFiles/kcontrol.dir/kcontrol_tdeinit_executable.cpp.o Linking CXX executable kcontrol CMakeFiles/kcontrol.dir/kcontrol_tdeinit_executable.cpp.o: In function `main': kcontrol_tdeinit_executable.cpp:(.text.startup+0x1): undefined reference to `kdemain' collect2: error: ld returned 1 exit status kcontrol/kcontrol/CMakeFiles/kcontrol.dir/build.make:103: recipe for target 'kcontrol/kcontrol/kcontrol' failed make[2]: *** [kcontrol/kcontrol/kcontrol] Error 1 CMakeFiles/Makefile2:6077: recipe for target 'kcontrol/kcontrol/CMakeFiles/kcontrol.dir/all' failed make[1]: *** [kcontrol/kcontrol/CMakeFiles/kcontrol.dir/all] Error 2 Makefile:116: recipe for target 'all' failed make: *** [all] Error 2 ==> ERROR: A failure occurred in build(). The build arguments are: cmake ${srcdir}/tdebase \ -DCMAKE_INSTALL_PREFIX=${TDEDIR} \ -DSYSCONF_INSTALL_DIR=/etc \ -DWITH_ARTS=ON \ -DWITH_GCC_VISIBILITY=ON \ -DWITH_I8K=ON \ -DWITH_LDAP=ON \ -DWITH_LIBART=ON \ -DWITH_LIBRAW1394=ON \ -DWITH_LIBUSB=ON \ -DWITH_OPENEXR=ON \ -DWITH_PAM=ON \ -DWITH_SAMBA=ON \ -DWITH_SASL=ON \ -DWITH_SENSORS=ON \ -DWITH_TDEHWLIB=ON \ -DWITH_UPOWER=ON \ -DWITH_XCOMPOSITE=ON \ -DWITH_XCURSOR=ON \ -DWITH_XDAMAGE=ON \ -DWITH_XDMCP=ON \ -DWITH_XEXT=ON \ -DWITH_XFIXES=ON \ -DWITH_XINERAMA=ON \ -DWITH_XRANDR=ON \ -DWITH_XRENDER=ON \ -DBUILD_ALL=ON