Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437650 - =dev-dotnet/libgdiplus-2.10.9 calls `pkg-config` directly despite setting up $PKG_CONFIG (see file configure.in)
Summary: =dev-dotnet/libgdiplus-2.10.9 calls `pkg-config` directly despite setting up ...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-09 00:34 UTC by igel
Modified: 2017-08-02 09:18 UTC (History)
0 users

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


Attachments
log of failed build (build.log,80.83 KB, text/plain)
2012-10-09 19:14 UTC, igel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description igel 2012-10-09 00:34:05 UTC
configure.in in the libgdiplus-2.10.9 source explicitly states -lpng14. The libpng dependency of the ebuild is also satisfied by libpng-1.5 and, thus, the code doesn't compile with libpng-1.5 installed but libpng-1.4 not installed.

Changing "-lpng14" to "-lpng15" in configure.in let me compile libgdiplus-2.10.9, but I haven't tested whether there are runtime errors...

Maybe the check for libpng14 could be replaced by a check for libpng and a check whether the version is recent enough, but since I really don't have any idea in dealing with configure.in, I'd rather not submit a patch...
Comment 1 Pacho Ramos gentoo-dev 2012-10-09 17:53:18 UTC
Please provide build.log and verify you have updated to libpng properly
Comment 2 igel 2012-10-09 19:14:03 UTC
Created attachment 326112 [details]
log of failed build
Comment 3 igel 2012-10-09 19:15:04 UTC
I do not quite understand what you mean by "verify you have updated to libpng properly". I can, however, assure you that everything depending on libpng works fine and

# eix libpng
[I] media-libs/libpng
     Available versions:  
	(1.2)	1.2.49 ~1.2.50
	(0)	1.5.10 ~1.5.11 ~1.5.12
	{{apng neon static-libs}}
     Installed versions:  1.5.10(06:21:48 PM 09/24/2012)(apng -neon -static-libs)
     Homepage:            http://www.libpng.org/
     Description:         Portable Network Graphics library

and

# pkg-config --libs libpng
-lpng15  

so I am pretty sure that my libpng is all right.
Comment 4 igel 2012-10-09 19:17:35 UTC
Oh dear, I just noticed:

# pkg-config --libs libpng12
-lpng14
Comment 5 Pacho Ramos gentoo-dev 2012-10-09 19:30:33 UTC

*** This bug has been marked as a duplicate of bug 319101 ***
Comment 7 igel 2012-10-09 21:13:40 UTC
sorry, I do not agree that this bug is a duplicate of the other bug you linked.

Consider the following: If I remove the /usr/lib64/pkgconfig/libpng12.pc (which should not be there anyways) and rebuild libgdiplus (yes, it does build in this case), then the configure script says:

checking for libpng14... checking for libpng12... no

so, there is no libpng support in the resulting libgdiplus. However, I *do* have a working libpng-1.5 and libgdiplus *does* compile *with* libpng support if I force it to link against libpng-1.5 by patching configure.in.

Concerning the text file you linked, I did what it says there (some revdep-rebuilding was necessary) and now

find /usr/ -name '*.la' -exec grep png14 {} +

returns nothing at all, so I assume that I "have updated to libpng properly", but the error remains.
Comment 8 Pacho Ramos gentoo-dev 2012-10-10 06:29:25 UTC
Will CC libpng maintainers because this looks really strange to me
Comment 9 SpanKY gentoo-dev 2012-11-15 00:52:56 UTC
in the past, packages used scan libpng versions, but that shouldn't be necessary anymore.  or at least, they could add a fallback to hit "libpng".

reading that configure.in shows other fails.  like running pkg-config directly (even though it already sets up $PKG_CONFIG).
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2012-11-15 03:23:05 UTC
(In reply to comment #4)
> Oh dear, I just noticed:
> 
> # pkg-config --libs libpng12
> -lpng14

you shouldn't have file called libpng12.pc installed at all, in /usr/lib/pkgconfig/ or /usr/share/pkgconfig/ or same directories inside /usr/local

so i'd say this is a situation you have created yourself, now deal with it
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2012-11-15 03:25:27 UTC
(In reply to comment #9)
> reading that configure.in shows other fails.  like running pkg-config
> directly (even though it already sets up $PKG_CONFIG).

we can reuse this bug for that, since the libpng related error is bogus, I guess
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2012-11-15 03:28:48 UTC
(In reply to comment #10)
> (In reply to comment #4)
> > Oh dear, I just noticed:
> > 
> > # pkg-config --libs libpng12
> > -lpng14
> 
> you shouldn't have file called libpng12.pc installed at all, in
> /usr/lib/pkgconfig/ or /usr/share/pkgconfig/ or same directories inside
> /usr/local

I bet you have a symlink called libpng12.pc -> libpng.pc or libpng14.pc
only libpng15.pc and libpng.pc, both needs to return -lpng15, and that they will do if you use libpng from Portage as intended
Comment 13 igel 2012-11-15 09:44:06 UTC
(In reply to comment #10)
> (In reply to comment #4)
> > Oh dear, I just noticed:
> > 
> > # pkg-config --libs libpng12
> > -lpng14
> 
> you shouldn't have file called libpng12.pc installed at all, in
> /usr/lib/pkgconfig/ or /usr/share/pkgconfig/ or same directories inside
> /usr/local
> 
> so i'd say this is a situation you have created yourself, now deal with it

okay, that's about the most arrogant reply I've read on this bugzilla so far...

Surely, I could tell you that everything done to pkgconfig was done by portage on my system, but there's not really a point, since we've progressed past this issue (see my own Comment 7 and SpanKY's Comment 9, which, seeing that your comments started with 10 you should have read before...)
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2012-11-15 11:56:29 UTC
(In reply to comment #13)
> okay, that's about the most arrogant reply I've read on this bugzilla so
> far...

sorry. really.

> Surely, I could tell you that everything done to pkgconfig was done by
> portage on my system, but there's not really a point, since we've progressed
> past this issue (see my own Comment 7 and SpanKY's Comment 9, which, seeing
> that your comments started with 10 you should have read before...)

i've read them, but what I said still stands, pkg-config --libs libpng12 does not print anything on Gentoo systems as there is no file or symlink called libpng12.pc installed by any package.  both libpng12 and libpng14 are gone from portage, well, there is the libpng slot for 1.2 which installs only 1 file, and that is not the .pc file

so really, find the libpng12.pc and delete it, follow the libpng update note Pacho pointed out in Comment #6. the only result installed via portage is:

$ pkg-config --libs libpng12
Package libpng12 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpng12.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng12' found
$ pkg-config --libs libpng14
Package libpng14 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpng14.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpng14' found
$ pkg-config --libs libpng15
-lpng15  
$ pkg-config --libs libpng
-lpng15
Comment 15 igel 2012-11-15 19:48:31 UTC
> so really, find the libpng12.pc and delete it, follow the libpng update note
> Pacho pointed out in Comment #6. the only result installed via portage is:
> 
> $ pkg-config --libs libpng12
> Package libpng12 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libpng12.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libpng12' found
> $ pkg-config --libs libpng14
> Package libpng14 was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libpng14.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'libpng14' found
> $ pkg-config --libs libpng15
> -lpng15  
> $ pkg-config --libs libpng
> -lpng15

I did all this on 2012-10-09, leading to a successful compile of libgdiplus without libpng support (build log says "checking for libpng14... checking for libpng12... no") because configure.in is somewhat messy/faulty. On my system, I "fixed" (meaning dirtily hacked) configure.in to detect my libpng-15. I think of this ticket as a pointer to an error in configure.in that someone with more knowledge of build systems than me might want to fix, just as SpanKY pointed out.
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2012-11-16 05:44:30 UTC
(In reply to comment #15)
> I did all this on 2012-10-09, leading to a successful compile of libgdiplus
> without libpng support (build log says "checking for libpng14... checking
> for libpng12... no") because configure.in is somewhat messy/faulty. On my
> system, I "fixed" (meaning dirtily hacked) configure.in to detect my
> libpng-15. I think of this ticket as a pointer to an error in configure.in
> that someone with more knowledge of build systems than me might want to fix,
> just as SpanKY pointed out.

the configure.in is properly setupped:

checking for libpng14... checking for libpng12... no
checking for png_read_info in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_structp in png.h... yes

as in:

      else
        AC_MSG_RESULT(no)
        AC_CHECK_LIB(png, png_read_info,
          [AC_CHECK_HEADER(png.h, png_ok=yes, png_ok=no)],

it has a fallback after libpng12.pc and libpng14.pc (neither installed by portage, as already pointed out many times) to search for the -lpng library, and it does.

really, fix your system and stop arguing...
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2012-11-16 05:46:09 UTC
the only bug here to fix is the calling of `pkg-config` directly which breaks cross-compiling and is not related to your issue... at all.
Comment 18 igel 2012-11-16 09:58:15 UTC
ah, you're right, I see the fallback now. Thanks for clearifying. I'll just shut up now and let you guys do your thing :]
Comment 19 Samuli Suominen (RETIRED) gentoo-dev 2012-11-16 10:18:58 UTC
(In reply to comment #18)
> ah, you're right, I see the fallback now. Thanks for clearifying. I'll just
> shut up now and let you guys do your thing :]

yep. I suspect you, at some point, encoutered problems with the libpng upgrade in the past -> therefore you had to install libpng12 or libpng14 manually and you made an `make install` that resulted in the libpng12.pc or libpng14.pc files/symlinks to be installed
after removing them away, the fallback works as designed in configure.in

futhermore you are partly correct that the libpng12 and libpng14 searches COULD be dropped from the configure.in, but that is an upstream issue and not related to Gentoo.

i'm glad you got it figured out!
Comment 20 Pacho Ramos gentoo-dev 2017-08-02 09:18:28 UTC
please retry with 4.2-r3