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

 
 

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

Submitter:  Michael Petch <mdpetch>
Submitted:  Tue 21 Feb 2012 05:46:59 AM UTC
   
 
Category:  None Severity:  3 - Normal
Status:  Fixed Privacy:  Public
Assigned to:  gflohr Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
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:

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/i386-linux-gnu
includedir=${prefix}/include

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>
Group 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>
Group administrator
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>
Group administrator
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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-26 gflohr StatusConfirmed Fixed
        Assigned toNone gflohr
    2012-02-26 gflohr StatusNeed Info Confirmed
    2012-02-26 gflohr StatusConfirmed Need Info
    2012-02-21 gflohr StatusNone Confirmed
    2012-02-21 mdpetch Attached File- Added config.log, #25098

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code