Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378081 - net-print/cups-1.5.2-r1 includes CFLAGS in cups-config --libs
Summary: net-print/cups-1.5.2-r1 includes CFLAGS in cups-config --libs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
: 396133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-07 13:40 UTC by Andrew Savchenko
Modified: 2013-06-26 22:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,7.39 KB, text/plain)
2011-08-07 13:41 UTC, Andrew Savchenko
Details
cups-config (cups-config,3.91 KB, text/plain)
2011-08-07 13:43 UTC, Andrew Savchenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2011-08-07 13:40:38 UTC
Hello,

cups-config script includes CFLAGS used to compile cups into LDFLAGS in cups-config script:

$ cups-config --libs
-lcups -march=atom -m32 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=512 -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -mstackrealign -ftree-loop-linear -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -fexcess-precision=fast -pipe -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -march=atom -m32 -O3 -fno-inline-functions -fno-ipa-cp-clone -mstackrealign -pipe -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lgnutls -lgcrypt -lgpg-error -lz -lpthread -lm -lcrypt

In case when --param var=value gcc parameters are used in CFLAGS, they will appear in LIBS variable for packages using cups-config --libs during compilation. Some of them fails to link due to this, like www-client/chromium-13.0.782.109:

flock out/Release/linker.lock i686-pc-linux-gnu-g++  -pthread -Wl,-z,noexecstack -m32 -Lout/Release -lpthread -ldl -lm -L/usr/lib -licui18n -
licuuc -licudata -lpthread -ldl -lm -Wl,-uIsHeapProfilerRunning,-uProfilerStart -Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMa
pPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi -Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHo
ok_SbrkPKvl -Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakChecker14UnIgnoreObjectEPKv -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -
march=atom -m32 -O3 -fno-inline-functions -fno-ipa-cp-clone -mstackrealign -pipe -Wl,-O1 -Wl,--as-needed -o out/Release/chrome -Wl,--start-grou
p out/Release/obj.target/chrome/chrome/app/chrome_main.o out/Release/obj.target/chrome/chrome/app/chrome_main_posix.o out/Release/obj.target/ch
rome/chrome/app/chrome_exe_main_gtk.o out/Release/obj.target/chrome/content/common/content_switches.o out/Release/obj.target/chrome/libbrowser.
a out/Release/obj.target/chrome/libsyncapi.a out/Release/obj.target/chrome/librenderer.a out/Release/obj.target/chrome/libsync_notifier.a out/R
elease/obj.target/chrome/libnacl.a out/Release/obj.target/chrome/libsync.a out/Release/obj.target/chrome/libservice.a out/Release/obj.target/ch
rome/libcommon.a out/Release/obj.target/remoting/libremoting_client_plugin.a out/Release/obj.target/content/libcontent_gpu.a out/Release/obj.ta
rget/content/libcontent_renderer.a out/Release/obj.target/content/libcontent_browser.a out/Release/obj.target/content/libcontent_worker.a out/R
elease/obj.target/content/libcontent_plugin.a out/Release/obj.target/remoting/libremoting_client.a out/Release/obj.target/content/libcontent_co
mmon.a out/Release/obj.target/remoting/libremoting_protocol.a out/Release/obj.target/content/libcontent_ppapi_plugin.a out/Release/obj.target/t
hird_party/WebKit/Source/WebKit/chromium/libwebkit.a out/Release/obj.target/remoting/libremoting_base.a out/Release/obj.target/ppapi/libppapi_p
roxy.a out/Release/obj.target/webkit/support/libglue.a out/Release/obj.target/remoting/libremoting_jingle_glue.a out/Release/obj.target/gpu/lib
command_buffer_service.a out/Release/obj.target/ppapi/libppapi_shared.a out/Release/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/li
bwebcore_svg.a out/Release/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_remaining.a out/Release/obj.target/third_party/W
ebKit/Source/WebCore/WebCore.gyp/libwebcore_html.a out/Release/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_platform.a o
ut/Release/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_rendering.a out/Release/obj.target/chrome/libcommon_net.a out/Release/obj.target/jingle/libjingle_glue.a out/Release/obj.target/webkit/support/libwebkit_gpu.a out/Release/obj.target/ui/gfx/surface/libsurface.a out/Release/obj.target/webkit/support/libfileapi.a out/Release/obj.target/webkit/support/libdatabase.a out/Release/obj.target/gpu/libgpu_ipc.a out/Release/obj.target/chrome/libdebugger.a out/Release/obj.target/jingle/libnotifier.a out/Release/obj.target/third_party/libjingle/libjingle_p2p.a out/Release/obj.target/webkit/support/libappcache.a out/Release/obj.target/ui/gfx/gl/libgl.a out/Release/obj.target/printing/libprinting.a out/Release/obj.target/webkit/support/libquota.a out/Release/obj.target/webkit/support/libwebkit_user_agent.a out/Release/obj.target/webkit/support/libblob.a out/Release/obj.target/gpu/libgles2_c_lib.a out/Release/obj.target/net/libhttp_server.a out/Release/obj.target/third_party/libjingle/libjingle.a out/Release/obj.target/app/libapp_base.a out/Release/obj.target/gpu/libgles2_implementation.a out/Release/obj.target/native_client/src/trusted/service_runtime/libsel.a out/Release/obj.target/third_party/WebKit/Source/WebCore/WebCore.gyp/libwebcore_bindings.a out/Release/obj.target/net/libnet.a out/Release/obj.target/v8/src/extensions/experimental/libi18n_api.a out/Release/obj.target/third_party/cacheinvalidation/libcacheinvalidation.a out/Release/obj.target/ui/libui_base.a out/Release/obj.target/gpu/libgles2_cmd_helper.a out/Release/obj.target/media/libmedia.a out/Release/obj.target/native_client/src/trusted/simple_service/libsimple_service.a out/Release/obj.target/native_client/src/trusted/gio/libgio_wrapped_desc.a out/Release/obj.target/chrome/app/policy/libpolicy.a out/Release/obj.target/chrome/libin_memory_url_index_cache_proto_cpp.a out/Release/obj.target/chrome/browser/sync/protocol/libsync_proto_cpp.a out/Release/obj.target/third_party/cacheinvalidation/libcacheinvalidation_proto_cpp.a out/Release/obj.target/remoting/proto/libtrace_proto_lib.a out/Release/obj.target/third_party/libphonenumber/libphonenumber.a out/Release/obj.target/remoting/proto/libchromotocol_proto_lib.a out/Release/obj.target/ui/libui_gfx.a out/Release/obj.target/third_party/WebKit/Source/JavaScriptCore/JavaScriptCore.gyp/libyarr.a out/Release/obj.target/chrome/libutility.a out/Release/obj.target/chrome/libinstaller_util.a out/Release/obj.target/gpu/libcommand_buffer_client.a out/Release/obj.target/media/libomx_wrapper.a out/Release/obj.target/native_client/src/trusted/desc/libnrd_xfer.a out/Release/obj.target/native_client/src/trusted/threading/libthread_interface.a out/Release/obj.target/v8/tools/gyp/libv8_snapshot.a out/Release/obj.target/base/libbase_i18n.a out/Release/obj.target/third_party/WebKit/Source/JavaScriptCore/JavaScriptCore.gyp/libwtf.a out/Release/obj.target/third_party/cld/libcld.a out/Release/obj.target/chrome/default_plugin/libdefault_plugin.a out/Release/obj.target/third_party/hunspell/libhunspell.a out/Release/obj.target/third_party/sqlite/libsqlite3.a out/Release/obj.target/skia/libskia.a out/Release/obj.target/build/temp_gyp/libgoogleurl.a out/Release/obj.target/crypto/libcrcrypto.a out/Release/obj.target/chrome/libcommon_constants.a out/Release/obj.target/ipc/libipc.a out/Release/obj.target/third_party/leveldb/libleveldb.a out/Release/obj.target/gpu/libcommand_buffer_common.a out/Release/obj.target/third_party/openmax/libil.a out/Release/obj.target/chrome/libprofile_import.a out/Release/obj.target/third_party/ffmpeg/libffmpeg.a out/Release/obj.target/native_client/src/trusted/service_runtime/arch/x86/libservice_runtime_x86_common.a out/Release/obj.target/native_client/src/trusted/nacl_base/libnacl_base.a out/Release/obj.target/base/libbase.a out/Release/obj.target/third_party/undoview/libundoview.a out/Release/obj.target/third_party/ots/libots.a out/Release/obj.target/native_client/src/trusted/platform_qualify/libplatform_qual_lib.a out/Release/obj.target/native_client/src/trusted/validator_x86/libncvalidate.a out/Release/obj.target/native_client/src/trusted/debug_stub/libdebug_stub.a out/Release/obj.target/sandbox/libsandbox.a out/Release/obj.target/native_client/src/shared/platform/libplatform.a out/Release/obj.target/media/libyuv_convert.a out/Release/obj.target/third_party/iccjpeg/libiccjpeg.a out/Release/obj.target/third_party/harfbuzz/libharfbuzz.a out/Release/obj.target/third_party/angle/src/libtranslator_glsl.a out/Release/obj.target/base/allocator/liballocator.a out/Release/obj.target/ppapi/libppapi_cpp_objects.a out/Release/obj.target/base/libsymbolize.a out/Release/obj.target/third_party/modp_b64/libmodp_b64.a out/Release/obj.target/native_client/src/shared/imc/libimc.a out/Release/obj.target/sdch/libsdch.a out/Release/obj.target/native_client/src/shared/srpc/libnonnacl_srpc.a out/Release/obj.target/native_client/src/trusted/perf_counter/libnacl_perf_counter.a out/Release/obj.target/third_party/protobuf/libprotobuf_lite.a out/Release/obj.target/native_client/src/trusted/service_runtime/arch/x86_32/libservice_runtime_x86_32.a out/Release/obj.target/third_party/zlib/libzlib.a out/Release/obj.target/third_party/WebKit/Source/ThirdParty/glu/libtess.a out/Release/obj.target/native_client/src/trusted/validator_x86/libnacl_cpuid_lib.a out/Release/obj.target/base/libxdg_mime.a out/Release/obj.target/native_client/src/trusted/gdb_rsp/libgdb_rsp.a out/Release/obj.target/base/libbase_static.a out/Release/obj.target/native_client/src/trusted/validator_x86/libncopcode_utils.a out/Release/obj.target/native_client/src/trusted/service_runtime/libnacl_error_code.a out/Release/obj.target/seccompsandbox/libseccomp_sandbox.a out/Release/obj.target/native_client/src/shared/gio/libgio.a out/Release/obj.target/media/libyuv_convert_sse2.a out/Release/obj.target/media/libcpu_features.a out/Release/obj.target/skia/libskia_opts.a out/Release/obj.target/third_party/angle/src/libtranslator_common.a out/Release/obj.target/native_client/src/trusted/service_runtime/libenv_cleanser.a out/Release/obj.target/v8/tools/gyp/libv8_base.a out/Release/obj.target/base/third_party/dynamic_annotations/libdynamic_annotations.a out/Release/obj.target/testing/libgtest.a out/Release/obj.target/net/third_party/nss/libssl.a -Wl,--end-group -lX11 -ldl -lXrender -lXss -lXext -lrt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng14 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lXi -levent -licui18n -licuuc -licudata -lz -ljpeg -lsmime3 -lnssutil3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -lresolv -lxml2 -lxslt -lwebp -lcups -march=atom -m32 --param ../printing/l1-cache-line-size=64 ../printing/l1-cache-size=32 ../printing/l2-cache-size=512 -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -mstackrealign -ftree-loop-linear -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -fexcess-precision=fast -pipe -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -O3 -fno-inline-functions -fno-ipa-cp-clone -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lgnutls -lgcrypt -lgpg-error -lcrypt -lbz2 -lvpx -lasound -lexpat -lFLAC -lspeex -ldbus-glib-1 -ldbus-1
i686-pc-linux-gnu-g++: ../printing/l1-cache-size=32: No such file or directory
i686-pc-linux-gnu-g++: ../printing/l2-cache-size=512: No such file or directory

With fixed cups-config chromium builds well, that's why I report this as a cups bug.
Comment 1 Andrew Savchenko gentoo-dev 2011-08-07 13:41:02 UTC
Created attachment 282415 [details]
emerge --info
Comment 2 Andrew Savchenko gentoo-dev 2011-08-07 13:43:22 UTC
Created attachment 282417 [details]
cups-config

Original cups-config from cups-1.4.6-r21 on the target system.
Comment 3 Rafał Mużyło 2011-08-07 14:52:04 UTC
Most likely, it's not really cups that fails here - it's kerberos (either mit or heimdal).
Comment 4 Andrew Savchenko gentoo-dev 2011-08-07 15:12:36 UTC
(In reply to comment #3)
> Most likely, it's not really cups that fails here - it's kerberos (either mit
> or heimdal).

I thought so too, but kerberos is fine (I use mit):

$ krb5-config --libs
-march=atom -m32 -O3 -fno-inline-functions -fno-ipa-cp-clone -mstackrealign -pipe -Wl,-O1 -Wl,--as-needed -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl

returns only LDFLAGS.

And when I recompile cups with simplified CFLAGS/CXXFLAGS, exactly those flags apperars at the beginnig of cups-config --libs output. I dig into cups configure script and it looks like it really prepends CFLAGS there.
Comment 5 Rafał Mużyło 2011-08-08 15:28:37 UTC
If I read the sources correctly, you should look at 'krb5-config --libs gssapi'.
Comment 6 Andrew Savchenko gentoo-dev 2011-08-08 16:16:57 UTC
(In reply to comment #5)
> If I read the sources correctly, you should look at 'krb5-config --libs
> gssapi'.

That's not the case:

krb5-config --libs gssapi
-march=atom -m32 -O3 -fno-inline-functions -fno-ipa-cp-clone -mstackrealign -pipe -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl

=app-crypt/mit-krb5-1.9.1

Please note -DDBUS_API_SUBJECT_TO_CHANGE in $LIBS, preprocessor directives are used in CFLAGS, but never during linking. And the only place in can be found in cups-1.4.6 configure is:

CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"

now compare it to the $LIBS content.
Comment 7 Rafał Mużyło 2011-08-08 17:49:36 UTC
Well, the thing is 'cups-config --libs' returns for me:
-lcups -L/usr/lib -lgssapi -lheimntlm -lkrb5 -lhx509 -lasn1 -lwind -lroken -pthread -lssl -lcrypto -lz -lpthread -lm -lcrypt
...but I'm not only using heimdal 1.3.3-r1, but also my ebuild for it significantly changes krb5-config to prevent this CFLAGS/LIBS mixup.

The relative position of the option groups suggest that kerberos is the culprit.
Comment 8 Laurent Bachelier 2012-01-25 03:03:19 UTC
Related to bug #396133, I emerged cups with different CFLAGS, and *only* by recompiling cups I went from:

$ cups-config --libs
-lcups -L/usr/lib64 -march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -O2 -pipe -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lgnutls -L/usr/lib64 -lgcrypt -lgpg-error -lz -lpthread -lm -lcrypt

to

$ cups-config --libs
-lcups -L/usr/lib64 -march=core2 -mcx16 -msahf -msse4.1 -O2 -pipe -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -Wl,-O1 -Wl,--as-needed -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lgnutls -L/usr/lib64 -lgcrypt -lgpg-error -lz -lpthread -lm -lcrypt

(I removed the --param's from my CFLAGS)


So I don't think it is related to kerberos. I'm using mit-krb5 by the way and I have:
$ krb5-config --libs 
-L/usr/lib64 -Wl,-O1 -Wl,--as-needed -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl
Comment 9 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2012-01-25 07:54:22 UTC
*** Bug 396133 has been marked as a duplicate of this bug. ***
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2012-04-05 19:16:53 UTC
Please check if this is still a problem for cups-1.5, and report back here...
Comment 11 Andrew Savchenko gentoo-dev 2012-04-05 19:48:21 UTC
(In reply to comment #10)
> Please check if this is still a problem for cups-1.5, and report back here...

This problem is still present with 1.5.2-r1.
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2012-04-19 21:53:52 UTC
Not a regression
Comment 13 Andreas K. Hüttel archtester gentoo-dev 2013-03-24 17:53:01 UTC
Please check if this is still a problem for cups-1.6, and report back here...
Comment 14 Andrew Savchenko gentoo-dev 2013-03-24 18:55:54 UTC
Looks like this is fixed with cups-1.6.1 (and mit-krb5-1.11.1):

$ cups-config --libs
-lcups -L/usr/lib64 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgnutls -lgcrypt -lgpg-error -lz -lpthread -lm -lcrypt -lz
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2013-06-26 22:25:34 UTC
(In reply to Andrew Savchenko from comment #14)
> Looks like this is fixed with cups-1.6.1 (and mit-krb5-1.11.1):
> 
> $ cups-config --libs
> -lcups -L/usr/lib64 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgnutls
> -lgcrypt -lgpg-error -lz -lpthread -lm -lcrypt -lz

Good.