Version: (using KDE KDE 3.4.92) Installed from: Gentoo Packages Compiler: x86_64-pc-linux-gnu-gcc (GCC) 4.0.2 (Gentoo 4.0.2-r1) OS: Linux When using --enable-final, kcheckpass fails to build on AMD64 (and probably any other PIC-liker architecture). The reason of this is that using --enable-final it seems to bypass the special automake rules, and just uses make builtin rules. This ignores the target_CFLAGS variables, where KDE_USE_FPIC is set, thus, the link stage (that still honor target_LDFLAGS) tries to link with -pie objects built without pic support (without -fpie). While kcheckpass fails entirely to build, other targets might bypass other special CFLAGS/CXXFLAGS set per-target, leading to unexpected behavior. A workaround for kcheckpass is probably to set AM_CFLAGS in the Makefile.am of the kcheckpass directory, but it's just a workaround, something else might be preferred.
sounds like an am_edit bug (unless you're using unsermake).
We're not using unsermake.
434792 mueller kcheckpass_CFLAGS = $(KDE_USE_FPIE)
it's not dirk's fault, david - unless we have the rule that everyone who starts using a (relatively) new automake feature has to fix am_edit himself. :)
> it's not dirk's fault, david - unless we have the rule that everyone who starts using a (relatively) new automake feature has to fix am_edit himself. :) Well, Dirk is also one of the main am_edit hackers... Also, he probably knows better than me how to fix this properly, since I have no idea about pic and pie (except for apple pies, of course).
ah, so there are actually *two* am_edit hackers. then it's ok, of course. :-P it's not about particular flags, only about foo_CFLAGS (which overrides AM_CFLAGS; CFLAGS itself is used always and the Makefile.am is not supposed to mess with it) in general. at least i think so.
its a long known problem that _CPPFLAGS etc do not work with recent automake + am_edit. Adding support for that is nontrivial last time I looked into it. I'd suggest to make $(KDE_USE_PIE) a AM_CPPFLAG in this case and be done.
SVN commit 472231 by mueller: fix compilation with pie support BUG: 114475 M +1 -2 Makefile.am --- branches/KDE/3.5/kdebase/kcheckpass/Makefile.am #472230:472231 @@ -2,14 +2,13 @@ ## written by Christian Esken ## -INCLUDES= $(all_includes) +INCLUDES= $(KDE_USE_FPIE) $(all_includes) bin_PROGRAMS = kcheckpass kcheckpass_SOURCES = kcheckpass.c \ checkpass_etcpasswd.c checkpass_pam.c checkpass_shadow.c \ checkpass_osfc2passwd.c checkpass_aix.c -kcheckpass_CFLAGS = $(KDE_USE_FPIE) kcheckpass_LDADD = -lkdefakes $(PASSWDLIBS) $(LIBSOCKET) kcheckpass_LDFLAGS = $(KDE_USE_PIE) $(all_libraries)
Is this really fixed? Now probably kcheckpass works, but what about other targets that uses special CFLAGS?
> Is this really fixed? Now probably kcheckpass works, but what about other targets that uses special CFLAGS? Which targets in particular? I don't think we have the same elsewhere in KDE.
Okay, that makes as "targets depending on _CFLAGS present are broken and need to be fixed for --enable-final, right? :) From Portage perspective this means that we might need to patch some extra packages if they shows a similar behavior, or to blacklist kdeenablefinal for them. Anyway, I'll apply the patch to kcheckpass in Gentoo so that it builds fine.
> From Portage perspective this means that we might need to patch some extra packages if they shows a similar behavior, or to blacklist kdeenablefinal for them. ... or to report such problems and we'll fix them too...
External packages, you want to know about them? :)
> External packages, you want to know about them? :) No. I thought we were talking about KDE (as in KDE releases) here.