By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 1832 - Build issue: tdebase FTBFS - kcontrol_tdeinit_executable.cpp undefined reference to `kdemain'
Summary: Build issue: tdebase FTBFS - kcontrol_tdeinit_executable.cpp undefined refere...
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: tdebase (show other bugs)
Version: R14.0.0 [Trinity]
Hardware: All Linux
: P5 major
Assignee: Timothy Pearson
URL:
Depends on:
Blocks:
 
Reported: 2014-01-19 00:21 CST by David C. Rankin
Modified: 2014-10-18 08:57 CDT (History)
4 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David C. Rankin 2014-01-19 00:21:17 CST
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
Comment 1 David C. Rankin 2014-01-19 01:29:15 CST
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?
Comment 2 David C. Rankin 2014-01-19 04:00:18 CST
old but possibly on point kde bug:

https://bugs.kde.org/show_bug.cgi?id=93347
Comment 3 David C. Rankin 2014-01-19 04:09:01 CST
(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)
Comment 4 David C. Rankin 2014-01-19 15:22:00 CST
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.
Comment 5 Slávek Banko 2014-01-20 11:53:46 CST
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?
Comment 6 David C. Rankin 2014-01-20 13:35:07 CST
(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"?
Comment 7 Slávek Banko 2014-01-20 13:44:45 CST
(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!
Comment 8 Darrell 2014-01-20 15:56:54 CST
>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.
Comment 9 Slávek Banko 2014-10-18 08:57:43 CDT
Fixed in commit 69da674b (tdebase).