Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443838 - dev-python/notify-python-0.1.1-r2 - ../libtool: eval: line 3995: syntax error near unexpected token `|'
Summary: dev-python/notify-python-0.1.1-r2 - ../libtool: eval: line 3995: syntax error...
Status: RESOLVED DUPLICATE of bug 463348
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-18 20:34 UTC by cyrillic
Modified: 2014-06-05 11:20 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,15.12 KB, text/plain)
2012-11-18 20:35 UTC, cyrillic
Details
configure-libtool-lto.patch (file_443838.txt,995 bytes, patch)
2013-05-07 02:34 UTC, cmuelle8
Details | Diff
notify-python-0.1.1-r3.ebuild.patch (notify-python-0.1.1-r3.ebuild.patch,785 bytes, patch)
2013-05-08 00:34 UTC, cmuelle8
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description cyrillic 2012-11-18 20:34:41 UTC
The build system is inserting an extra pipe "|" where it shouldn't be, and this is causing a problem.

Reproducible: Always




# emerge --info
Portage 2.2.0_alpha142 (default/linux/amd64/10.0/no-multilib, gcc-4.7.2, glibc-2.16.0, 3.7.0-rc6 x86_64)
=================================================================
System uname: Linux-3.7.0-rc6-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2
Timestamp of tree: Thu, 15 Nov 2012 22:45:01 +0000
ld GNU ld (Linux/GNU Binutils) 2.23.51.0.5.20121110
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p39
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          9999
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.4
sys-devel/binutils:       2.23.51.0.5
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r5::gnome
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo cross gnome x11 gentoo_fixes newstuff
ACCEPT_KEYWORDS="* amd64 ~*"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=barcelona -O2 -pipe -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=barcelona -O2 -pipe -flto"
DISTDIR="/mnt/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="distlocks fixlafiles parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en"
MAKEOPTS=""
PKGDIR="/var/tmp/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/portage"
PORTDIR_OVERLAY="/mnt/portage/local/cross /mnt/portage/local/gnome /mnt/portage/local/x11 /mnt/portage/local/gentoo_fixes /mnt/portage/local/newstuff"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac alsa amd64 avahi bluetooth boost bzip2 cairo consolekit cracklib css cups curl custom-cflags custom-cpuopts custom-optimization cxx dbus dts dvd eds egl encode exceptions expat fbcon ffmpeg flac fortran gif glib gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 icu introspection ipv6 jit jpeg lcms libnotify lzma mmx mmxext mp3 nautilus ncurses networkmanager nls nptl offensive ogg opengl openmp pam pango pcre png policykit postscript python3 qt3support qt4 readline samba speex spell sqlite sse sse2 sse3 ssl svg tcl theora threads tiff udev unicode usb vala vorbis x264 xcb xorg xv xvid zeroconf zlib" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LINGUAS="en" PYTHON_TARGETS="python3_2" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel nouveau radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 cyrillic 2012-11-18 20:35:32 UTC
Created attachment 329896 [details]
build.log
Comment 2 Arfrever Frehtes Taifersar Arahesis 2012-11-25 09:43:50 UTC
It is not a bug in dev-python/notify-python.

The problem looks similarly to bug #196243.
Also disable -flto and rebuild libtool (bug #324107).
Comment 3 cyrillic 2012-11-27 02:34:14 UTC
Sorry about the noise.
Last time I tried removing -flto from notify-python, it didn't make any difference, but this time it worked.

When I read through bug 196243. I noticed comment 20 mentions the exact problem I was having : global_symbol_pipe=""

I just don't understand why -flto affects how the package's libtool is generated.
Comment 4 cmuelle8 2013-05-07 02:30:45 UTC
(In reply to comment #3)
> I just don't understand why -flto affects how the package's libtool is
> generated.

An educated guess would be that one or more configure test go havoc with -flto.  

For gtkglext you'll run into a similar problem trying to compile with -flto.

The problem is that most symbols of test programs are optimized out.  I.e. the tests are too simple.  A symbol not marked __attribute__((used)) is unlikely to make it into a generated object or binary file during ac_compile or ac_link if gcc -flto determines that "it is not used".

Most of the tests generated by configure do not produce runnable executables, but gcc -flto optimizes for this szenario.  The question is:  is the symbol needed for execution of the compilation unit or binary?  is there a dependency on the symbol?  If not, it's optimized/thrown out of the generated file.

The compiler does not know that configure is just probing it with some little test code, some object files, etc. - you'll have to tell it.


The following patch makes the configure generated libtool of gtkglext work, if -flto is used to compile the test programs.  Something similar will work for this bug as well.  I've not tried, but it's possible that the patch will apply to this pkg's configure without modification (but with offset fuzziness).

--- gtkglext-1.2.0/configure.orig	2013-05-07 03:48:34.987285143 +0200
+++ gtkglext-1.2.0/configure		2013-05-07 03:50:53.803539987 +0200
@@ -5946,11 +5946,9 @@
   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
   ;;
 linux*)
-  if test "$host_cpu" = ia64; then
     symcode='[ABCDGIRSTW]'
     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  fi
   ;;
 irix* | nonstopux*)
   symcode='[BCDEGRST]'
@@ -6006,8 +6004,8 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-char nm_test_var;
-void nm_test_func(){}
+char nm_test_var __attribute__((used));
+void __attribute__((used)) nm_test_func(){}
 #ifdef __cplusplus
 }
 #endif
Comment 5 cmuelle8 2013-05-07 02:34:32 UTC
Created attachment 347560 [details, diff]
configure-libtool-lto.patch

untested patch working for a similar problem in another build
Comment 6 cmuelle8 2013-05-07 02:42:23 UTC
(In reply to comment #5)
> untested patch working for a similar problem in another build

If there are lot's of lto-unsave test programs in a given configure, an alternative is to sed -i configure to weave in "__attribute__((used))" where necessary.  See

  https://bugs.gentoo.org/attachment.cgi?id=345856&action=diff

for a working example.
Comment 7 cmuelle8 2013-05-08 00:34:19 UTC
Created attachment 347682 [details, diff]
notify-python-0.1.1-r3.ebuild.patch

Non-invasive patch to enable lto compiles.

This is tested to work and is identical to the fix for gtkglext, see bug #468958

Please change the title of this bug fromr r2 to r3, thanks.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-05 11:20:40 UTC

*** This bug has been marked as a duplicate of bug 463348 ***