Compiling Paths Issues

Hi all,

I am having issues with configure+make on a few applications on my Leap42.2 lately. In my example I am building libzip-1.2.0. libzip is to be used in building another application VCVRack. What happens is that the zipconf.h file is being placed in the rack32/lib64/libzip/include folder (rack32 is the target directory) instead of rack32/lib/libzip/include/

./configure --prefix=/home/chris/test/rack32

After make install -

../rack32/include:
total 32
drwxr-xr-x 2 chris users  4096 Jan 24 08:47 .
drwxr-xr-x 6 chris users  4096 Jan 24 08:47 ..
-rw-r--r-- 1 chris users 21464 Jan 24 08:47 zip.h

../rack32/lib64:
total 2664
drwxr-xr-x 4 chris users    4096 Jan 24 08:47 .
drwxr-xr-x 6 chris users    4096 Jan 24 08:47 ..
drwxr-xr-x 3 chris users    4096 Jan 24 08:47 libzip
-rw-r--r-- 1 chris users 1945004 Jan 24 08:47 libzip.a
-rwxr-xr-x 1 chris users     927 Jan 24 08:47 libzip.la
lrwxrwxrwx 1 chris users      15 Jan 24 08:47 libzip.so -> libzip.so.5.0.0
lrwxrwxrwx 1 chris users      15 Jan 24 08:47 libzip.so.5 -> libzip.so.5.0.0
-rwxr-xr-x 1 chris users  760448 Jan 24 08:47 libzip.so.5.0.0
drwxr-xr-x 2 chris users    4096 Jan 24 08:47 pkgconfig

../rack32/lib64/libzip:
total 12
drwxr-xr-x 3 chris users 4096 Jan 24 08:47 .
drwxr-xr-x 4 chris users 4096 Jan 24 08:47 ..
drwxr-xr-x 2 chris users 4096 Jan 24 08:47 include

**../rack32/lib64/libzip/include:**
total 12
drwxr-xr-x 2 chris users 4096 Jan 24 08:47 .
drwxr-xr-x 3 chris users 4096 Jan 24 08:47 ..
-rw-r--r-- 1 chris users  992 Jan 24 08:47 **zipconf.h**

../rack32/lib64/pkgconfig:
total 12
drwxr-xr-x 2 chris users 4096 Jan 24 08:47 .
drwxr-xr-x 4 chris users 4096 Jan 24 08:47 ..
-rw-r--r-- 1 chris users  353 Jan 24 08:47 libzip.pc

The ./configure log I made tells me this -

libdir='${exec_prefix}/**lib64**'     <----------------why lib64 and not just lib?
libexecdir='${exec_prefix}/lib'

I built a fresh opensuse OS into a VirtualBox image and libzip makes and installs the zipconf.h file where expected ie no lib64 is used. What controls -if any - which directory gets used ie lib or lib64? I have scratched my head for two days over this.

PS. I am well aware that libzip and it’s devel files are in the standard repos, but I need to know why I can’t manually compile to paths as expected.

I’m using GCC version 6.

Thanks,
Chris.

LEAP is x64 only and unless you are doing cross compiling ./configure will make a 64bit makefile which will use lib64 instead of lib
if you want to build a 32bit executable you need to have the 32bit development packages installed and run something like

./configure --host=i686-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"

./configure --host=i686-linux-gnu “CFLAGS=-m32” “CXXFLAGS=-m32” “LDFLAGS=-m32”

That does indeed seem to work (after I installed the 32bit versions of GCC et al as well).

However, it still does not explain why my VirtualBox LEAP 42 defaults to building the 32bit version WITHOUT needing any extra parameters.

More digging…

And dug I did. Today that Virtualbox Leap installation builds libzip as 64bit without the parameter flags. I have obviously done something wrong there - but what that was is another matter:’(