I am trying to install zlib-1.2.8 from within "/root/tmp/zlib-1.2.8/" but I think my configuration options are incomplete. The configuration command that I'm using is:

./configure --prefix=/usr2/lib2 --eprefix=/usr2/lib2

Prior to compilation the "/usr2/lib2/" directory is empty so that makes it easy to make comparisons to what is in "/root/tmp/zlib-1.2.8/". After the

make install

command is executed, I've noticed that there are a number of *.o, *.lo, *.h, and *.c files in the "/root/tmp/zlib-1.2.8/" directory that are not present in any directory under the target directory "/usr2/lib2/". This makes me think that my configuration specification is incomplete. I believe the *.c files would go in an src directory, the *.h files would go in an include directory, I don't know where the *.lo or *.o files would go. How would I specify these options in the configure command? I would appreciate it if someone could tell me how to correct this situation?


Your configuration seems ok to me (you normally only have to override the sensible defaults in ./configure), you would normally include the build step (make). From the FAQ file included in the downloaded 1.2.8 archive:

13. How can I make a Unix shared library?

    By default a shared (and a static) library is built for Unix.  So:

    make distclean

14. How do I install a shared zlib library on Unix?

    After the above, then:

    make install

make is the last step of point 13

The resulting directories do not include source files (and should not), but they do include headers (needed for other programs to compile against zlib):

├── include
│   ├── zconf.h
│   └── zlib.h
├── lib
│   ├── libz.a
│   ├── libz.so -> libz.so.1.2.8
│   ├── libz.so.1 -> libz.so.1.2.8
│   ├── libz.so.1.2.8
│   └── pkgconfig
│       └── zlib.pc
└── share
    └── man
        └── man3
            └── zlib.3

It is normal that not all results of the make step are copied over to the destination during the make install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.