bugGibbon - Bugs: bug #35578, Lex/Yacc Makefile missing...


bug #35578: Lex/Yacc Makefile missing dependencies / zlib build issue

Submitted by:  Michael Petch <mdpetch>
Submitted on:  Tue 21 Feb 2012 05:46:59 AM UTC  
Category: NoneSeverity: 3 - Normal
Status: FixedPrivacy: Public
Assigned to: Guido Flohr <gflohr>Open/Closed: Open
Operating System: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sun 26 Feb 2012 10:26:57 PM UTC, comment #5:

Hopefully fixed with commit f34ea125c867eceeb6d9cd5ac671754130fc026b.

Do you think, we also have to add checks for freetype and expat?

The additional dependency on libbz2 on my system is probably caused by a different version of fontconfig.

Guido Flohr <gflohr>
Project AdministratorIn charge of this item.
Sun 26 Feb 2012 10:06:50 PM UTC, comment #4:

Agreed, I overlooked the inclusion of zlib.h in svg.c. I will add a check for libz to configure.ac.

Still, I do not fully understand the problem. Fontconfig requires in Libs.private -lexpat -lfreetype -lz -lbz2. So why does -lz cause a problem, and the others not? Especially, because -lz is also required by gio-2.0.pc and that has nothing to do with libsvg.

Lost in autotools. ;)

Guido Flohr <gflohr>
Project AdministratorIn charge of this item.
Sun 26 Feb 2012 08:24:19 PM UTC, comment #3:

I disagree about your view on zlib. Since I am using pre-compiled binaries on Debian there are no .la files . The information is retrieved from pkg-config . Fontconfig indirectly gets loaded by the pkg-config system with our requirement on gtk+2.0 .

On my platform, gtk-+2.0 requires pangoft2 which in turn requires Fontconfig. Fontconfig.pc says:


Name: Fontconfig
Description: Font configuration and customization library
Version: 2.8.0
Libs: -L${libdir} -lfontconfig
Libs.private: -lexpat -lfreetype -lz
Cflags: -I${includedir}

You will note that it correctly has -lz under Libs.private . libfontconfig doesn't directly expose zlib (but it uses it) so it should be in Libs.private . If you were statically linking the application then -lz (and the others) would be dragged in.

On my system glib-2.0.pc doesn't list zlib under "Libs" or "Libs.private", however when I do ldd on libglib-2.0.so I do find it has a dynamic dependency on zlib.

Gibbon has a direct requirement on zlib. We require the library and the dev files (headers) since we include them directly in libsvg/svg.c . I believe that since we are doing this, zlib is our direct dependency and should be treated as such.

I can work around this issue on my platform by doing ./configure LDFLAGS="-lz" however IMHO I don't think it should be this way.

Michael Petch <mdpetch>
Project Member
Sun 26 Feb 2012 04:08:39 PM UTC, comment #2:

I think the zlib issue is not a bug in gibbon. Can you look into /usr/lib/libfontconfig.la and /usr/lib/libgio-2.la? They should both list -lz in dependency_libs.

I am a little bit reluctant to "fix" that by explicitely linking against -lz because also -lbz, -lfreetype, and -lexpat are only dragged in by dependency_libs.

Guido Flohr <gflohr>
Project AdministratorIn charge of this item.
Sun 26 Feb 2012 03:22:10 PM UTC, comment #1:

The first part of the issue looks like a problem in the GNU autotools to me.

Basically we have parser.y and lexer.l, and lexer.l includes parser.h which is generated by compiling parser.y into parser.c. Therefore lexer.c depends on parser.h, which depends on parser.y. But that outsmarts GNU autotools.

The real fix to the problem is to add the dependency manually to Makefile.am, so that lexer.o now depends on parser.h.

Guido Flohr <gflohr>
Project AdministratorIn charge of this item.
Tue 21 Feb 2012 05:46:59 AM UTC, original submission:

Makefile.am variable common_SOURCES is missing gibbon-java-fibs-parser.h and gibbon-jelly-fish-parser.h . If you delete the header files (ie. make maintainer-clean) they aren't recreated because their dependencies are missing.

On Debian Wheezy 32 bit, I also encountered a build issue (linker) regarding the zlib library. I get this message:

/usr/bin/ld: ../libsvg/libsvg.a(svg.o): undefined reference to symbol 'gzdopen'
/usr/bin/ld: note: 'gzdopen' is defined in DSO /usr/lib/libz.so.1 so try adding it to the linker command line
/usr/lib/libz.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [gibbon] Error 1
make[2]: Leaving directory `/home/mpetch/gibbon/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mpetch/gibbon'
make: *** [all] Error 2

The error message is explanatory. -lz is missing from GIBBON_LIBS in src/Makefile . For some reason the autoconf/configure magic isn't picking up the dependency of zlib's shared objects. If I manually add -lz to GIBBON_LIBS it does work.

Attached i a copy of my config.log.

Michael Petch <mdpetch>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #25098:  config.log added by mdpetch (101kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by gflohr (Updated the item)
  • -unavailable- added by mdpetch (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 26 Feb 2012 10:26:57 PM UTCgflohrStatusConfirmed=>Fixed
      Assigned toNone=>gflohr
    Sun 26 Feb 2012 10:09:08 PM UTCgflohrStatusNeed Info=>Confirmed
    Sun 26 Feb 2012 04:08:39 PM UTCgflohrStatusConfirmed=>Need Info
    Tue 21 Feb 2012 10:40:03 AM UTCgflohrStatusNone=>Confirmed
    Tue 21 Feb 2012 05:46:59 AM UTCmdpetchAttached File-=>Added config.log, #25098

    Back to the top

    Powered by Savane 3.1-cleanup