(un)zip (Full Version)

All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum



Message


Parkway -> (un)zip (Jul. 15, '05, 10:55:12 AM)

Wanting a later version of zip/unzip than the ones SFU installed in /usr/contrib/bin I tried downloading the info-zip tars, and zip built immediately. However I had more trouble with unzip; it has no configure but eventually I got it to build using
make CC=gcc LD=gcc CF="-O -I. -DUNIX -DBSD" -f unix/Makefile unzips
Have I been doing things the hard way again?




Rodney -> RE: (un)zip (Jul. 15, '05, 2:10:00 PM)

We'd need to know what the problems or error messages were produced
for the building or linking of unzip. Generally speaking the
FAQ entries for Developers is a good place to start.
The same information in FAQ 4.02 can be applied. So using "-D_ALL_SOURCE"
is good for helping prototypes be exposed. Adding "-I/usr/local/include"
and "-L /usr/local/lib" usually is helpful as well.

Anyway, more detail is needed.




Rodney -> RE: (un)zip (Jul. 15, '05, 3:06:55 PM)

I took a look at the unzip Makefile.
You need to make a specific "interix" entry just as there is one for all of the
other Unix systems in the Makefile. The following entry makes it all go:
interix:        unix_make
        $(MAKE) unzips CF="-I/usr/local/include -D_ALL_SOURCE -DUSE_ZLIB -O2 -I. -DUNIX" LF="$(LF)" LF2="-L /usr/local/lib -lz"


I raised the optimization to 'O2' and built using cc.
I've now made the package for this as a side-effect... so I'll post it up to the
ftp site and announce it in a few minutes (pkg_update -L unzip).




Parkway -> RE: (un)zip (Jul. 15, '05, 3:22:09 PM)

I managed to simplify my command line to
make CC=gcc LD=gcc -f unix/Makefile bsd
which suggests that info-zip is missing a bsd_gcc target but I include the errors from other attempts for completeness:
quote:

We'd need to know what the problems or error messages were produced
for the building or linking of unzip.
make gcc
gcc -c -O3 -I.  unzip.c
In file included from unzpriv.h:1825,
                 from unzip.h:654,
                 from unzip.c:64:
globals.h:259: error: field `statbuf' has incomplete type
make sysv_gcc
gcc -c -O2 -I. -DUNIX -DSYSV  fileio.c
fileio.c: In function `dos_to_unix_time':
fileio.c:1758: error: `timezone' undeclared (first use in this function)
fileio.c:1758: error: (Each undeclared identifier is reported only once
fileio.c:1758: error: for each function it appears in.)
make bsd
cc -o unzip unzip.o crc32.o crctab.o crypt.o envargs.o explode.o extract.o
fileio.o globals.o inflate.o list.o match.o process.o ttyio.o unreduce.o
unshrink.o zipinfo.o unix.o -s
cc: unknown file extension in '-s'.
quote:

Generally speaking the
FAQ entries for Developers is a good place to start.
The same information in FAQ 4.02 can be applied. So using "-D_ALL_SOURCE"
is good for helping prototypes be exposed. Adding "-I/usr/local/include"
and "-L /usr/local/lib" usually is helpful as well.
Except I already pointed out that unzip doesn't provide a configure script.




Rodney -> RE: (un)zip (Jul. 15, '05, 4:24:55 PM)

> Except I already pointed out that unzip doesn't provide a configure script

Yes, I am aware of that. My point is that these can be provided to the build
process and will generally help complete the build. Yes, the FAQ refers to "configure"
specifically. But the information can be used in build files as well (for make or jam).

If you want to build with gcc instead of cc then add the Makefile entry
I've given in my previous posting and then with your command line switch "bsd" for "interix".




Parkway -> RE: (un)zip (Oct. 12, '06, 8:14:01 AM)

quote:

ORIGINAL: Rodney
I've now made the package for this as a side-effect... so I'll post it up to the
ftp site and announce it in a few minutes (pkg_update -L unzip).

Annoyingly it doesn't remove the original version in /usr/contrib/bin which confused me for too long...




markfunk -> RE: (un)zip (Oct. 12, '06, 9:27:20 AM)

quote:

Annoyingly it doesn't remove the original version in /usr/contrib/bin
This is correct behaviour.
InteropSystems provides 3rd party tools for the Interix environment.
InteropSystems should _not_ be replacing any original files as distributed from Microsoft.
The tools from Interopsystems should be installed in an independent location (like /usr/local/).
It is then up to the user to decide which utilities they want to use by configuring
their PATH environment variable appropriately (or setting up shell aliases, or whatever).




Rodney -> RE: (un)zip (Oct. 12, '06, 11:44:00 AM)

Part of the installation of packages going into /usr/local/bin
is to depend on another package that sets PATH in the startup
scripts for the shells (ksh, csh, bash, zsh) to have usr/local/bin
ahead of the previously existing paths.

You can tell which binaries get chosen by doing "whence XXX" with sh/ksh
or "which XXX" with csh/tcsh.




Page: [1]



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.297