Author Topic: rpmbuild / autoconf / puzzling error  (Read 1122 times)

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
rpmbuild / autoconf / puzzling error
« on: January 06, 2012, 09:32:09 AM »
Hi All,

trying to build lightdm-1.1.0 (same as Archie...) I'm meeting a strange behavior:

I edit the specfile and add one configure parameter, later when I run rpmbuild -ba specfile this error show out:
Quote
+ ./autogen.sh --disable-gtk-doc --with-greeter-session=lightdm-default-greeter --with-greeter-user=lightdm --disable-static
/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... /usr/bin/autoconf: line 401: echo: write error: Broken pipe
found 2.65
checking for automake >= 1.7...
  testing automake-1.11... ^C

if I run again rpmbuild -ba specfile, the error is gone:
Quote
+ ./autogen.sh --disable-gtk-doc --with-greeter-session=lightdm-default-greeter --with-greeter-user=lightdm --disable-static
/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.65
checking for automake >= 1.7...
  testing automake-1.11... found 1.11.1
checking for libtool >= 1.4.3...
  testing libtoolize... ^C

running rpmbuild a third time repeat the error, a fourth time the error is gone ... and so on ..
the above happen on a virtualbox 64 bit guest ... it look a like a very strange error

Any advice will be greatly appreciated.

AS

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: rpmbuild / autoconf / puzzling error
« Reply #1 on: January 06, 2012, 09:40:14 AM »
Hmm...... /usr/bin/autoconf line #401 ---     
Code: [Select]
       echo "$version" ; exit ;;     
 ??? :-\ :-\     

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3747
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: rpmbuild / autoconf / puzzling error
« Reply #2 on: January 06, 2012, 09:54:03 AM »
What is with this???

http://min.us/mlRWVomRB

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #3 on: January 06, 2012, 09:57:34 AM »
re-reading the error:

Quote
+ ./autogen.sh --disable-gtk-doc --with-greeter-session=lightdm-default-greeter --with-greeter-user=lightdm --disable-static
/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... /usr/bin/autoconf: line 401: echo: write error: Broken pipe
found 2.65
checking for automake >= 1.7...
  testing automake-1.11... ^C

I'm thinking that it could be a self-inflicted issue, caused by using CTRL+C, that doesn't interrupt all (sub)processes of rpmbuild ...
let me try to reboot/restart the build a couple of times ..


Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: rpmbuild / autoconf / puzzling error
« Reply #4 on: January 06, 2012, 10:01:08 AM »
Why did you use <Cntrl> + C? ???     

Did you download Leiche's src.rpm and have a look at it?     

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #5 on: January 06, 2012, 10:10:24 AM »
re-reading the error:

Quote
+ ./autogen.sh --disable-gtk-doc --with-greeter-session=lightdm-default-greeter --with-greeter-user=lightdm --disable-static
/usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... /usr/bin/autoconf: line 401: echo: write error: Broken pipe
found 2.65
checking for automake >= 1.7...
  testing automake-1.11... ^C


I'm thinking that it could be a self-inflicted issue, caused by using CTRL+C, that doesn't interrupt all (sub)processes of rpmbuild ...
let me try to reboot/restart the build a couple of times ..

nope ... just reboot the virtual machine, restarted the build and the error show out immediately:

Quote
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... /usr/bin/autoconf: line 401: echo: write error: Broken pipe
found 2.65


I can add that if I run ./autogen.sh directly from the BUILD directory I never see this error, look like somewhat related to rpmbuild ...

What is with this???

http://min.us/mlRWVomRB

Thanks Leiche, I will try that too, ASAP  ;)


Why did you use <Cntrl> + C? ???     

Did you download Leiche's src.rpm and have a look at it?     

Because as soon as I started the build I realize that I needed to add another option ... however look like CTRL+C is not related ...

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: rpmbuild / autoconf / puzzling error
« Reply #6 on: January 06, 2012, 10:19:57 AM »
The source of your problem is here:     
checking for autoconf >= 2.53...     
found 2.65     

Your spec is saying :look for 2.53. It shouldn't.     

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #7 on: January 06, 2012, 10:30:19 AM »
The source of your problem is here:     
checking for autoconf >= 2.53...     
found 2.65     

Your spec is saying :look for 2.53. It shouldn't.     

the specfile doesn't mention autoconf at all, the only file where I can find a "2.53" string is "BUILD/lightdm-1.1.0/m4/intltool.m4":
Quote
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
do I need to change/patch that file ?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: rpmbuild / autoconf / puzzling error
« Reply #8 on: January 06, 2012, 10:37:20 AM »
My best advice is to have a look at Leiche's src.rpm to see how he handled this.     

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #9 on: January 06, 2012, 10:40:22 AM »
My best advice is to have a look at Leiche's src.rpm to see how he handled this.     

Of course, will do. Thanks so far!  ;)

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #10 on: January 06, 2012, 12:06:44 PM »
The source of your problem is here:    
checking for autoconf >= 2.53...    
found 2.65    

Your spec is saying :look for 2.53. It shouldn't.    

Indeed, You were/are correct!  :D

changed from ./autogen.sh to %configure2_5x in specfile and now there is no check for autoconf anymore.
However I was able to complete the compile/link step while using ./autogen.sh, and am actually unable to complete the link step,
because of the following undefined reference:

Quote
make[3]: Entering directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests/src'
  CC     libsystem_la-libsystem.lo
 CCLD   libsystem.la
.libs/libsystem_la-libsystem.o: In function `free_user':
libsystem.c:(.text+0x8): undefined reference to `g_free'
libsystem.c:(.text+0x11): undefined reference to `g_free'
libsystem.c:(.text+0x1a): undefined reference to `g_free'
libsystem.c:(.text+0x23): undefined reference to `g_free'
libsystem.c:(.text+0x2c): undefined reference to `g_free'
.libs/libsystem_la-libsystem.o: In function `load_passwd_file':
libsystem.c:(.text+0x6a): undefined reference to `g_list_free_full'
libsystem.c:(.text+0x8c): undefined reference to `g_getenv'
libsystem.c:(.text+0x9e): undefined reference to `g_file_get_contents'
libsystem.c:(.text+0xc0): undefined reference to `g_log'
libsystem.c:(.text+0xc8): undefined reference to `g_clear_error'
libsystem.c:(.text+0xe7): undefined reference to `g_strsplit'
libsystem.c:(.text+0xf4): undefined reference to `g_free'
libsystem.c:(.text+0x114): undefined reference to `g_strfreev'
libsystem.c:(.text+0x12a): undefined reference to `g_strchug'
libsystem.c:(.text+0x132): undefined reference to `g_strchomp'
libsystem.c:(.text+0x146): undefined reference to `g_strsplit'
libsystem.c:(.text+0x151): undefined reference to `g_strv_length'
libsystem.c:(.text+0x16b): undefined reference to `g_strdup'
libsystem.c:(.text+0x178): undefined reference to `g_strdup'
libsystem.c:(.text+0x1b0): undefined reference to `g_strdup'
libsystem.c:(.text+0x1be): undefined reference to `g_strdup'
libsystem.c:(.text+0x1cc): undefined reference to `g_strdup'
libsystem.c:(.text+0x1e0): undefined reference to `g_list_append'
libsystem.c:(.text+0x1f4): undefined reference to `g_strfreev'
.libs/libsystem_la-libsystem.o: In function `pam_getenvlist':
libsystem.c:(.text+0x7f7): undefined reference to `g_strdup_printf'
.libs/libsystem_la-libsystem.o: In function `free_user':
libsystem.c:(.text+0x35): undefined reference to `g_free'
collect2: ld returned 1 exit status
make[3]: *** [libsystem.la] Error 1
make[3]: Leaving directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/as/src/rpm/BUILD/lightdm-1.1.0'
make: *** [all] Error 2
error: Bad exit status from /home/as/src/tmp/rpm-tmp.ykuSZj (%build)


RPM build errors:
    Bad exit status from /home/as/src/tmp/rpm-tmp.ykuSZj (%build)

I believe that a link to glib-2.0 is missing somewhere. Any further hint ?

EDIT: is this a consequence of that (self generated from the package) libsystem.la ? how to get rid of that ?
« Last Edit: January 06, 2012, 12:20:56 PM by as »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: rpmbuild / autoconf / puzzling error
« Reply #11 on: January 06, 2012, 02:49:02 PM »
If you have a "whatever.la," you will need to use:     
Quote from: Texstar
rm -rf /usr/lib64/*.la

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #12 on: January 06, 2012, 02:54:39 PM »
If you have a "whatever.la," you will need to use:     
Quote from: Texstar
rm -rf /usr/lib64/*.la

Yes, of course, the file libsystem.la you see in my report is one built from the package itself, as you may notice from the path:
make[3]: Entering directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests/src'

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: rpmbuild / autoconf / puzzling error
« Reply #13 on: January 10, 2012, 06:22:35 AM »
The source of your problem is here:    
checking for autoconf >= 2.53...    
found 2.65    

Your spec is saying :look for 2.53. It shouldn't.    

Indeed, You were/are correct!  :D

changed from ./autogen.sh to %configure2_5x in specfile and now there is no check for autoconf anymore.
However I was able to complete the compile/link step while using ./autogen.sh, and am actually unable to complete the link step,
because of the following undefined reference:

Quote
make[3]: Entering directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests/src'
  CC     libsystem_la-libsystem.lo
 CCLD   libsystem.la
.libs/libsystem_la-libsystem.o: In function `free_user':
libsystem.c:(.text+0x8): undefined reference to `g_free'
[... snipped ...]
collect2: ld returned 1 exit status
make[3]: *** [libsystem.la] Error 1
make[3]: Leaving directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/as/src/rpm/BUILD/lightdm-1.1.0/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/as/src/rpm/BUILD/lightdm-1.1.0'
make: *** [all] Error 2
error: Bad exit status from /home/as/src/tmp/rpm-tmp.ykuSZj (%build)


RPM build errors:
    Bad exit status from /home/as/src/tmp/rpm-tmp.ykuSZj (%build)

I believe that a link to glib-2.0 is missing somewhere. Any further hint ?

EDIT: is this a consequence of that (self generated from the package) libsystem.la ? how to get rid of that ?


one step forward  ;)

The link issue has been solved by adding the following line immediately before  %configure2_5x
Code: [Select]
%define _disable_ld_no_undefined 1
Hope this is the right thing to do.  ???  I'm unsure, as I have found there can be alternative solutions ...
Anyway, lightDM-1.1.0 is packaged, although some warning still exist  :)

AS