I cannot compile hplip package for some reason: x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"HP\ Linux\ Imaging\ and\ Printing\" -DPACKAGE_TARNAME=\"hplip\" -DPACKAGE_VERSION=\"3.11.12\" -DPACKAGE_STRING=\"HP\ Linux\ Imaging\ and\ Printing\ 3.11.12\" -DPACKAGE_BUGREPORT=\"3.11.12\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hplip\" -DVERSION=\"3.11.12\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBDL=1 -DHAVE_PTHREAD_H=1 -DHAVE_JPEGLIB_H=1 -DHAVE_UINT32_T=1 -DHAVE_LIBHPIP=1 -DHAVE_LIBHPIP=1 -DHAVE_PPORT=1 -DHAVE_LINUX_PPDEV_H=1 -DHAVE_CUPS_CUPS_H=1 -DHAVE_USB_H=1 -DHAVE_PYTHON2_7_PYTHON_H=1 -DHAVE_DBUS=1 -I. -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -DCONFDIR=\"/etc/hp\" -O2 -pipe -march=native -c -o hp_mkuri-hp-mkuri.o `test -f 'io/hpmud/hp-mkuri.c' || echo './'`io/hpmud/hp-mkuri.c /bin/sh ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -DCONFDIR=\"/etc/hp\" -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -o hp-mkuri hp_mkuri-hp-mkuri.o -ldl libhpmud.la libtool: link: x86_64-pc-linux-gnu-gcc -DCONFDIR=\"/etc/hp\" -O2 -pipe -march=native -Wl,-O1 -Wl,--as-needed -o .libs/hp-mkuri hp_mkuri-hp-mkuri.o -ldl ./.libs/libhpmud.so -lusb -lpthread ./.libs/libhpmud.so: undefined reference to `timer_create' ./.libs/libhpmud.so: undefined reference to `timer_delete' ./.libs/libhpmud.so: undefined reference to `timer_gettime' ./.libs/libhpmud.so: undefined reference to `timer_settime' collect2: ld returned 1 exit status make: *** [hp-mkuri] Error 1 * ERROR: net-print/hplip-3.11.12-r2 failed (compile phase): * emake failed # emerge --info =net-print/hplip-3.11.12-r2 Portage 2.1.10.44 (!../usr/portage/profiles/default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.2.2-default x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.2.2-default-x86_64-Intel-R-_Core-TM-_i7-2640M_CPU_@_2.80GHz-with-gentoo-2.1 Timestamp of tree: Thu, 02 Feb 2012 22:00:01 +0000 app-shells/bash: 4.2_p20 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.1.4-r3, 3.2.2 dev-util/cmake: 2.8.7-r2 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.11.2-r1 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.2.4-r1, 4.3.6-r1, 4.5.3-r2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.2 (virtual/os-headers) sys-libs/glibc: 2.14.1-r2 Repositories: gentoo science x-portage x-layman ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE skype-eula Nero-EULA-US" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/mnt/external/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news nostrip parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en cs cz" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/mnt/external/usr/portage" PORTDIR_OVERLAY="/home/mmokrejs/proj/sci /usr/local/portage /var/lib/layman" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa amd64 amr apache apache2 berkdb bzip2 cairo cgi cli cracklib crypt cups cxx dbus device-mapper dhcp dri emboss encode ffmpeg flac fontconfig fortran gd gdbm gnome gnutls gpm hal iconv id3tag innodb ipv6 java jce jpeg jpg ladspa laptop libnotify mad mmx modules mpi mpich2 multilib mysql ncurses nfs nls nptl nptlonly nsplugin ogg opengl openmp openssl pam parport pcre pdf perl php png policykit ppds pppd python qt3support qt4 readline scanner server session sndfile sse sse2 sse3 ssl suexec svg sysfs syslog tcpd threads tiff truetype unicode usb wavpack xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs cz" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa intel vmware fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= net-print/hplip-3.11.12-r2 was built with the following: USE="X hpcups (multilib) policykit qt4 -acl -doc -fax -hpijs -kde -libnotify -minimal -parport -scanner -snmp -static-ppds" # emerge -pqv =net-print/hplip-3.11.12-r2 [ebuild R ] net-print/hplip-3.11.12-r2 USE="X hpcups libnotify* parport* policykit qt4 scanner* -acl -doc -fax -hpijs -kde -minimal -snmp -static-ppds"
Created attachment 300919 [details] build.log
Does not happen with USE=-parport (which does not help me with my old HP OfficeJet R45 printer/scanner exposing only a parallel port).
http://www.kernel.org/doc/man-pages/online/pages/man2/timer_create.2.html lead to some some info that one needs to add "-lrt" during linking. I added it to the generated Makefile at two places (line numbers shown): 4112 libhpmud_la_LDFLAGS = -version-info 0:6:0 -lusb -lpthread -lrt 4126 hp_mkuri_LDADD = -ldl -lrt libhpmud.la And finally, I see my printer+scanner through xsane back again.
Created attachment 301039 [details, diff] hplip-3.11.12-lrt.patch Patch to pass "-lrt" to linker.
Martin, thanks for your patch! Can you please run revdep-rebuild and then try to build hplip _without_ your patch. In bug #401337 the problem went away without the need of a patch, probably due to a problem with reverse dependencies.
H Daniel, sorry but "revdep-rebuild -i" does not find any problems. I think you can ask somebody from toolchain whether one check if inclusion of -lpthread needs also -lrt or not. That would be the only think I would do to improve the patch.
I just added hplip-3.12.2. Try this new version and if it still fails can you please open a bug about this at https://bugs.launchpad.net/hplip.
Created attachment 301231 [details] build.log (hplip-3.12.2) Looks upstream already added "-lrt" but somewhere it is omitted.
And my patch still applies over the 3.12.2 version and just works. Please add it to portage.
(In reply to comment #8) > Created attachment 301231 [details] > build.log (hplip-3.12.2) > Looks upstream already added "-lrt" but somewhere it is omitted. Can you please point me to the upstream resource documenting this? There is nothing in the release notes for 3.12.2 about it.
*** Bug 401337 has been marked as a duplicate of this bug. ***
Okay I found out the problem. The functions timer_* were introduced in the patch from bug #361847. So the patch was incomplete and needs to be updated to add linkage of libhhmud with -lrt.
+ 08 Feb 2012; Daniel Pielmeier <billie@gentoo.org> + files/hplip-3.11.12-fast-pp.patch: + Update the fast-pp patch to add linkage against lrt. This fixes bug #402177. + Thanks to Juergen Rose and Martin Mokrejš for the patch. Should be fixed. Please test if everything is okay.
(In reply to comment #13) > + 08 Feb 2012; Daniel Pielmeier <billie@gentoo.org> > + files/hplip-3.11.12-fast-pp.patch: > + Update the fast-pp patch to add linkage against lrt. This fixes bug #402177. > + Thanks to Juergen Rose and Martin Mokrejš for the patch. > > Should be fixed. Please test if everything is okay. 3.12.2 now installs fine for me, thanks.
*** Bug 402783 has been marked as a duplicate of this bug. ***