Author Topic: Macro substitution  (Read 501 times)

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Macro substitution
« on: March 11, 2012, 03:46:14 PM »
Hi All,

trying to rebuild avahi, met the following issue:

the file /usr/lib/pkgconfig/avahi-compat-howl is generated with the following content:

Quote
Description: Avahi Multicast DNS Responder (HOWL Compatibility)
Version: @HOWL_COMPAT_VERSION@
Libs: -L${libdir} -lhowl
Cflags: -D_REENTRANT -I${includedir}

the  file configure.ac contain the following macro:
Quote
AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8])

it seems the substitution doesn't occur.

Hints ?

Thanks
AS

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Macro substitution
« Reply #1 on: March 13, 2012, 04:52:14 PM »
Anyone here ?  Needs more info ?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Macro substitution
« Reply #2 on: March 14, 2012, 03:05:38 AM »
More info, yes, please.     

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Macro substitution
« Reply #3 on: March 14, 2012, 05:13:55 AM »
More info, yes, please.     


Short history: Leiche, and not me, was trying to build avahi packages, he was nearly done when an error happened at time
of rpm building:

Quote
Requires: libavahi-client.so.3 libavahi-common.so.3 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.3.4) libc.so.6(GLIBC_2.4) libpthread.so.0 libpthread.so.0(GLIBC_2.0) libpthread.so.0(GLIBC_2.1) rtld(GNU_HASH)
Obsoletes: libhowl0
Processing files: libavahi-compat-howl-devel-0.6.28-2Leiche2012.i586
Finding  Provides: /usr/lib/rpm/mandriva/filter.sh ' ' ' ' '/home/leiche/src/rpm/BUILDROOT/avahi-0.6.28-2Leiche2012.i386' /usr/lib/rpm/mandriva/find-provides
error: line 800: Illegal char '@' in:

error: Failed to find Provides:
Provides: avahi-compat-howl-devel = 0.6.28-2Leiche2012 libavahi-compat-howl-devel = 0.6.28-2Leiche2012 libhowl0-devel = 1.0.0-7mdk howl-devel = 0.6.28-2Leiche2012 libhowl-devel = 0.6.28-2Leiche2012
Requires(rpmlib): rpmlib(VersionedDependencies) <= 3.0.3-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Obsoletes: libhowl0-devel libavahi-compat-howl0-devel


RPM build errors:
    line 800: Illegal char '@' in:

    Failed to find Provides:



I helped him to track down where the error come from, in the end the reason was the pkgconfig file mentioned in the original post, containing the illegal char '@'.

There is a similar pkgconfig file where the substitution actually take place, as far as I can understand they are processed the same way. probably not!

I have no idea where to look at ...

Quote
$ cat avahi-compat-howl.pc.in
prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
includedir=${prefix}/include/avahi-compat-howl/

Name: avahi-compat-howl
Description: Avahi Multicast DNS Responder (HOWL Compatibility)
Version: @HOWL_COMPAT_VERSION@
Libs: -L${libdir} -lhowl
Cflags: -D_REENTRANT -I${includedir}


Quote
$ cat avahi-compat-libdns_sd.pc.in
prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
includedir=${prefix}/include/avahi-compat-libdns_sd/

Name: avahi-compat-libdns_sd
Description: Avahi Multicast DNS Responder (libdns_sd Compatibility)
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -ldns_sd
Cflags: -D_REENTRANT -I${includedir}


after processing the results are:

correct:
Quote
$ cat avahi-compat-libdns_sd.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib
includedir=${prefix}/include/avahi-compat-libdns_sd/

Name: avahi-compat-libdns_sd
Description: Avahi Multicast DNS Responder (libdns_sd Compatibility)
Version: 0.6.28
Libs: -L${libdir} -ldns_sd
Cflags: -D_REENTRANT -I${includedir}


wrong:
Quote
$ cat avahi-compat-howl.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib
includedir=${prefix}/include/avahi-compat-howl/

Name: avahi-compat-howl
Description: Avahi Multicast DNS Responder (HOWL Compatibility)
Version: @HOWL_COMPAT_VERSION@
Libs: -L${libdir} -lhowl
Cflags: -D_REENTRANT -I${includedir}


Makefile.in
http://pastebin.com/vZZdEfZq

configure.ac
http://pastebin.com/xdJ4ntZ6

Other info ?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Macro substitution
« Reply #4 on: March 14, 2012, 07:39:31 AM »
Hmm...... have you contacted avahi devs? Checked their bug reports?     

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Macro substitution
« Reply #5 on: March 14, 2012, 07:49:13 AM »
Hmm...... have you contacted avahi devs? Checked their bug reports?     

no action so far,  you think it is a bug in their source package ?

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Macro substitution
« Reply #6 on: March 14, 2012, 07:57:08 AM »
Could be. Not sure.