Free Downloads, Community Forum,
FAQs and Developer Resources


Make /Tools Your Home | Link to us

Today's posts | Posts since last visit | Most Active Topics

All Forums Register Login Search Subscriptions My Profile Inbox
Tool Warehouse FAQs Resources Help Member List Address Book Logout

(un)zip

 
Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> (un)zip Page: [1]
Login
Message << Older Topic   Newer Topic >>
(un)zip - Jul. 15, '05, 10:55:12 AM   
Parkway

 

Posts: 13
Joined: Jul. 4, '05,
Status: offline
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?
Post #: 1
RE: (un)zip - Jul. 15, '05, 2:10:00 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
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.

(in reply to Parkway)
Post #: 2
RE: (un)zip - Jul. 15, '05, 3:06:55 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
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).

(in reply to Rodney)
Post #: 3
RE: (un)zip - Jul. 15, '05, 3:22:09 PM   
Parkway

 

Posts: 13
Joined: Jul. 4, '05,
Status: offline
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.

(in reply to Rodney)
Post #: 4
RE: (un)zip - Jul. 15, '05, 4:24:55 PM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
> 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".

(in reply to Parkway)
Post #: 5
RE: (un)zip - Oct. 12, '06, 8:14:01 AM   
Parkway

 

Posts: 13
Joined: Jul. 4, '05,
Status: offline
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...

(in reply to Rodney)
Post #: 6
RE: (un)zip - Oct. 12, '06, 9:27:20 AM   
markfunk

 

Posts: 669
Joined: Mar. 31, '03,
Status: offline
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).

(in reply to Parkway)
Post #: 7
RE: (un)zip - Oct. 12, '06, 11:44:00 AM   
Rodney

 

Posts: 3695
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
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.

(in reply to markfunk)
Post #: 8
Page:   [1]
All Forums >> [SFU / Interix / SUA Technology] >> Tools Discussion Forum >> (un)zip Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Search All Forums -

Advanced search


SPONSORS



Forum Software © ASPPlayground.NET Advanced Edition 2.5 ANSI

0.047