[opensuse-factory] no 32bit .pc files on 64bit host
[I'm actually using Leap, but I guess the situation isn't much different for Factory – please correct me if I'm wrong] I've just tried to compile HarfBuzz as a 32bit library on my 64bit box for testing purposes. By default, this library uses .pc files (for pkg-config) to find libraries. One of them is zlib. However, openSuSE's 32bit package of zlib doesn't come with a proper 32bit `zlib.pc' file (to be installed into `/usr/lib/pkgconfig'); and it seems that basically all other 32bit library packages don't provide .pc files either... Bug? Intention? Werner N�����r��y隊Z)z{.���r�+�맲��r��z�^�ˬz��N�(�֜��^� ޭ隊Z)z{.���r�+��0�����Ǩ�
On Sun, 13 Mar 2016 10:48:23 +0100, Werner LEMBERG wrote:
[I'm actually using Leap, but I guess the situation isn't much different for Factory – please correct me if I'm wrong]
I've just tried to compile HarfBuzz as a 32bit library on my 64bit box for testing purposes. By default, this library uses .pc files (for pkg-config) to find libraries. One of them is zlib. However, openSuSE's 32bit package of zlib doesn't come with a proper 32bit `zlib.pc' file (to be installed into `/usr/lib/pkgconfig'); and it seems that basically all other 32bit library packages don't provide .pc files either...
Bug? Intention?
At first, I thought it a bug. But then reconsidered, ask yourself the following: when you have two *.pc files, one in /usr/lib/pkgconfig and another in /usr/lib64/pkgconfig, which file would PKG_CHECK_MODULE() macro refer to? Takashi -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
I've just tried to compile HarfBuzz as a 32bit library on my 64bit box for testing purposes. By default, this library uses .pc files (for pkg-config) to find libraries. One of them is zlib. However, openSuSE's 32bit package of zlib doesn't come with a proper 32bit `zlib.pc' file (to be installed into `/usr/lib/pkgconfig'); and it seems that basically all other 32bit library packages don't provide .pc files either...
Bug? Intention?
At first, I thought it a bug. But then reconsidered, ask yourself the following: when you have two *.pc files, one in /usr/lib/pkgconfig and another in /usr/lib64/pkgconfig, which file would PKG_CHECK_MODULE() macro refer to?
Yes, I've just now come to the same conclusion: pkg-config itself is buggy, since it doesn't support multiple architectures at the same time. For example, pkg-config 0.28 as delivered by 64bit openSuSE searches first /usr/local/lib64, then /usr/local/lib (instead of trying /usr/lib64 before)... HOWEVER: I still think that 32bit .pc files should be provided, using a cross-compiling approach so that a call like configure --host=i686-linux-gnu \ CFLAGS=-m32 \ CXXFLAGS=-m32 \ LDFLAGS=-m32 works. What about using a directory for 32bit .pc files that contains `i686-linux-gnu' in the path? At the same time, a `pkg-config-32bit' should be created that provides a `pkg-config-i686-linux-gnu' binary with properly adjusted paths for finding 32bit .pc files first. Werner -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Monday 2016-03-14 09:50, Werner LEMBERG wrote:
openSuSE's 32bit package of zlib doesn't come with a proper 32bit `zlib.pc' file [...] Bug? Intention?
At first, I thought it a bug. But then reconsidered, ask yourself the following: when you have two *.pc files, one in /usr/lib/pkgconfig and another in /usr/lib64/pkgconfig, which file would PKG_CHECK_MODULE() macro refer to?
pkg-config itself is buggy, since it doesn't support multiple architectures at the same time. HOWEVER: I still think that 32bit .pc files should be provided, using a cross-compiling approach so that a call like
configure --host=i686-linux-gnu \ CFLAGS=-m32 \ CXXFLAGS=-m32 \ LDFLAGS=-m32
That already works today, even if only by chance. Since there is no i686-linux-gnu-pkg-config present, the regular pkg-config will be used, which, generally, has the same -I and -L,-l flags for packages irrespective of build target. Rather than /usr/lib/pkgconfig, one ought to consider /usr/lib/$tuple/pkgconfig and/or /usr/$target/bin for these things. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
HOWEVER: I still think that 32bit .pc files should be provided, using a cross-compiling approach so that a call like
configure --host=i686-linux-gnu \ CFLAGS=-m32 \ CXXFLAGS=-m32 \ LDFLAGS=-m32
That already works today, even if only by chance. Since there is no i686-linux-gnu-pkg-config present, the regular pkg-config will be used,
Yep.
which, generally, has the same -I and -L,-l flags for packages irrespective of build target.
Exactly, and this is the very problem...
Rather than /usr/lib/pkgconfig, one ought to consider /usr/lib/$tuple/pkgconfig and/or /usr/$target/bin for these things.
I fully agree, and packages specific to 32bit stuff within a 64bit environment should use those locations. Werner -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Werner LEMBERG <wl@gnu.org> writes:
I've just tried to compile HarfBuzz as a 32bit library on my 64bit box for testing purposes. By default, this library uses .pc files (for pkg-config) to find libraries. One of them is zlib. However, openSuSE's 32bit package of zlib doesn't come with a proper 32bit `zlib.pc' file (to be installed into `/usr/lib/pkgconfig'); and it seems that basically all other 32bit library packages don't provide .pc files either...
Bug? Intention?
At first, I thought it a bug. But then reconsidered, ask yourself the following: when you have two *.pc files, one in /usr/lib/pkgconfig and another in /usr/lib64/pkgconfig, which file would PKG_CHECK_MODULE() macro refer to?
Yes, I've just now come to the same conclusion: pkg-config itself is buggy, since it doesn't support multiple architectures at the same time.
That's only the first step. You will get many more problems by the lack of multiarch support in header files (though zlib seems to be clean here). Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Monday 2016-03-14 10:50, Andreas Schwab wrote:
That's only the first step. You will get many more problems by the lack of multiarch support in header files (though zlib seems to be clean here).
Given most people build most parts with OBS by now, it may not even be worth pursuing it all that much. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (4)
-
Andreas Schwab
-
Jan Engelhardt
-
Takashi Iwai
-
Werner LEMBERG