Summary: | make fails during link step | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Felix <felix> |
Component: | Portability-Cmake | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | 0.7.3 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.6.0 | |
Sentry Crash Report: | |||
Attachments: |
config.log
modified kdemacros.h |
Description
Felix
2005-07-10 05:57:45 UTC
seems to be a visibility issue with the fedora compiler. i have heard only the fedora users complaining about this problem Renchi, I am not sure if I understand what you are saying, but I *did* make a change recommended http://bugs.kde.org/show_bug.cgi?id=108458#c5 - that is, I changed visibility to "default" in kdemacros.h nevermind about my earlier comment. what is the compiler version you have? (g++ -v should give you that info). Also can you attach your config.log (it will be present in your top level digikam source directory once you run configure). Created attachment 11771 [details]
config.log
config.log from ./configure
g++ -v Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.3/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux Thread model: posix gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.fc3) i have a strong feeling its a visibility bug. can you also attach your kdemacros.h (should be in /usr/include/kde) and then i will know for sure. Created attachment 11787 [details]
modified kdemacros.h
I changed 'visible' to 'default'
one more quick test. $ cd digikam-0.7.3/ digikam/digikam/.libs $ objdump -t -C libdigikam.so |grep ImagePlugin::ImagePlugin and let me know of the output of the above command "visible" only affects KDE 3.3.0. No version later or before. Yes, those errors are typical of visibility problems. $objdump -t -C libdigikam.so |grep ImagePlugin::ImagePlugin
00134088 l F .text 00000054 .hidden Digikam::ImagePlugin::ImagePlugin(QObject*, char const*)
001340dc l F .text 00000054 .hidden Digikam::ImagePlugin::ImagePlugin(QObject*, char const*)
the obvious question, of course, is whether this ".hidden" is a problem...
>"visible" only affects KDE 3.3.0. No version later or before.
Ihave KDE 3.3.1 (straight from FC3 distribution) As I mentioned earlier, I am getting compile-time "visible" problem with the original kdemacros.h. So, either there is something else in play (that affects both compile and link) or this assertion is incorrect.
Sorry, you're right. 3.3.1 is also affected: $ svn cat svn://anonsvn.kde.org/home/kde/tags/KDE/3.3.0/kdelibs/kdecore/kdemacros.h | grep KDE_EXPORT\ __attribute__ #define KDE_EXPORT __attribute__ ((visibility("visible"))) $ svn cat svn://anonsvn.kde.org/home/kde/tags/KDE/3.3.1/kdelibs/kdecore/kdemacros.h | grep KDE_EXPORT\ __attribute__ #define KDE_EXPORT __attribute__ ((visibility("visible"))) $ svn cat svn://anonsvn.kde.org/home/kde/tags/KDE/3.3.2/kdelibs/kdecore/kdemacros.h | grep KDE_EXPORT\ __attribute__ #define KDE_EXPORT __attribute__ ((visibility("default"))) Please upgrade your kdelibs to >= 3.3.2, or manually patch kdemacros.h to reflect the correct value. > Please upgrade your kdelibs to >= 3.3.2, or manually patch kdemacros.h to reflect the correct value.
I did patch kdemacros.h (see attached file); that's why I don't get the compile error any more. Are you sure the link error (undefined reference to `Digikam::ImagePlugin::...') is also due to visibility problem? I am not quite following the logic here
> ------- Additional Comments From felix rabinovich org 2005-07-13 08:05 -------
> > Please upgrade your kdelibs to >= 3.3.2, or manually patch kdemacros.h to reflect the correct value.
> I did patch kdemacros.h (see attached file); that's why I don't get the compile error any more. Are you sure the link error (undefined reference to `Digikam::ImagePlugin::...') is also due to visibility problem? I am not quite following the logic here
I am not sure but probably the error arises because the default
visibilty will now be hidden but the plugin will need that to be
visible. Since compile time error is solved it means its a linking
issue and these kind of errors(Undefined reference) existed even
without visibility when the symbols were not found (due to improper
linking).
I didn't do a proper study on visibility attribute but what I could
make is it is some kind of exposing/non exposing of symbols. So if
visibility is hidden it acts like not exposing the symbols and that
might be stopping the linking as it is undefined reference case.
some one could clarify these issues please? As I already told briefly
in previous post setting visible to hidden patch in kdemacros.h helped
me in compiling digikam but the kipi-plugins were not showing up in
the interface of digikam. So I finally had to disable the visibility
stuff from my configure.in.in files.
--
001340dc l F .text 00000054 .hidden Digikam::ImagePlugin::ImagePlugin(QObject*, char const*) the above indicates its a visiblity problem. that is a bit surprising considering that your kdemacros.h is patched to enable visibility. i'm emailing you my kdemacros.h. replace your system one with that and rebuild the tarball from scratch. will do tonight (that is in 8-10 hours). In the meantime I noticed that the flags in link command (see above) are "-fvisibility=hidden -fvisibility-inlines-hidden". Wouldn't that override visibility flag from kdemacros.h? Now, I have to admit, I have no idea what 'visibility' means here (visibility of object module for the linker; visibility/scope of the variable at runtime, something else - I haven't programmed professionally for over 10 years). so I am not even sure that my question makes sense :-) But for those who know better - didn't want to overlook this visibility=hidden thingy during link! while you are at it, you might as well install the soon to be released digikam 0.7.4. the tarballs are here: http://pooh.tam.uiuc.edu/digikam/split_tarballs/ no luck! tried the new kdemacros.h (from email) with both 0.7.3 and 0.7.4 - I still get the linking error :-( there gotta be something else (or something else as well ;-/ ) Felix, i got hold of a fedora core 3 and was able to reproduce the problem and subsequently fix the problem. here is the list of fixes: * if kde < 3.3.2, then don't enable hidden visibility * a missing config.h was added to digikam_export.h * instead of relying on kdemacros.h the digikam_export.h directly uses the gcc default attribute. this enable compilation on all kde versions (with no requirement to change kdemacros.h). currently only the digikam tarball is fixed. i will update the digikamimageplugins package as well. as before the tarballs are here: http://pooh.tam.uiuc.edu/digikam/split_tarballs/ for the record, I also had to install libtool-ltdl-devel. Otherwise I got "missing /usr/lib/libltdl.la" error. Once I had that, everything gets built (and starts up) OK. Looking forward to updated digikamimageplugins package as well... Thanks a lot for the quick fix! Hopefully, I won't be the only one to enjoy it :-) |