From: Daniel Veillard (veillard@rufus.w3.org)
Date: Sat Mar 28 1998 - 12:53:31 EST
Quoting Esben Haabendal Soerensen (bart@sunsite.auc.dk):
> > I definitely think it should work once one have been able to
> > compile rpm and libz ... I can try to invest more time to help you
> > bootstrap if you feel the need for it !
>
> I little help wouldn't hurt :-)
> I am currently working on to many projects and would therefore like to get this
> nice rpm2html tool runnings as soon as possible.
>
> I have found two problems which is causing my troubles.
>
> 1. compressor doesn't work, as it doesn't find the libz library.
>
> ---------------------
> bart@sunsite:~/rpm2html-0.80/src/rpm2html-0.80> ./compressor
> ld.so.1: ./compressor: fatal: libz.so.1.0.4: open failed: No such file or directory
> Killed
> bart@sunsite:~/rpm2html-0.80/src/rpm2html-0.80> ll /coll/local/lib/libz*
> lrwxrwxrwx 1 root other 22 Feb 19 21:13 /coll/local/lib/libz.so -> /pack/zlib/lib/libz.so
> lrwxrwxrwx 1 root other 28 Feb 19 21:13 /coll/local/lib/libz.so.1.0.4 -> /pack/zlib/lib/libz.so.1.0.4
> ---------------------
>
> What do you think might cause this ?
Shared libs are evil, and on Solaris that's even worse. Configure found the libraries,
gcc is able at link time to open is, but the loader don't find them if you want to
run the resulting binaries :-( ...
What about :
- trying to compile with static libraries
make "CC=gcc -static"
in that case you can be sure you won't have troubles
but it seems (from the ls result) that these static libraries are not available
- Adding /coll/local/lib/ to your LD_LIBRARY_PATH environment variable
- Change the linking for the binaries to add extra parameter for shared libs paths
In the makefile change
LIBS= -lrpm -ldb -lz
by (say that -lrpm is in /usr/local/lib and libdb and libz are in /coll/local/lib)
LIBS= -R/usr/local/lib -L/usr/local/lib -lrpm -R/coll/local/lib -L/coll/local/lib -ldb -lz
Doing the last step allowed at least compressor to run without hicup.
The next portability problems I was faced are:
- the use of scandir and alphasort in rpmopen.c to scan a directory
It seems that these are provided by /usr/bsd/cc but it doesn't work on
our solaris-2.6 machine here,
- the use of isblank() macro, this one is ugly and already removed from my
CVS tree.
Unfortunately I'm not ready to release the next version right now, there is too many
things on the workbench. I my be able to release one this week-end however.
As soon as I have something which compiles correctly without scandir and isblank,
I will ship an intermediate version.
> 2. make (and gmake) always tries to make the dir.gif rule, no matter
> what rules I trie to give.
>
> ---------------------
> bart@sunsite:~/rpm2html-0.80/src/rpm2html-0.80> make clean
> compressor dir.gif
> ld.so.1: compressor: fatal: libz.so.1.0.4: open failed: No such file or directory
> *** Signal 9
> make: Fatal error: Command failed for target `dir.gif.h'
> ---------------------
yep, that a dependancy problem, you need dir.gif.h to compile the C files
(at least for html.c) and the first thing the Makefile tries to do is to compute
the dependancies, hence it tries to produre the dir.gif.h first.
----------------- dir.gif.h --------------------------
/* output from compressor, need #include <zlib.h>" */
#define data_buffer_size 225
unsigned char data_buffer[220] = {
0x78,0x9c,0x73,0xf7,0x74,0xb3,0xb0,0x4c,0x14,0x61,0x10,0x63,0x38,0xc4,0xc0,
0xf0,0x1f,0x08,0xce,0xcc,0x3c,0xf3,0xff,0xff,0xcc,0x34,0x63,0x20,0x60,0x80,
0x01,0xc5,0x7f,0x7e,0x21,0x19,0x99,0xc5,0x0a,0x89,0x45,0x25,0x0a,0x40,0x2a,
0x33,0x4f,0xa1,0x24,0x23,0x55,0xa1,0xa0,0x34,0x29,0x27,0x33,0x59,0x21,0x25,
0x3f,0x37,0x31,0x33,0x4f,0x4f,0xc1,0x3b,0xb5,0x0c,0x28,0xe1,0x51,0x9a,0x9e,
0x91,0x5a,0xac,0xa3,0x90,0x0d,0xe2,0x65,0x38,0xa4,0x66,0x96,0xe8,0x25,0xe7,
0xe7,0xea,0x28,0x04,0xa7,0x16,0x94,0xa4,0xe6,0x26,0xa5,0x16,0x29,0x18,0x5a,
0x5a,0x9a,0x32,0x28,0xfe,0x64,0x61,0x64,0x60,0x60,0x62,0xd0,0x01,0x19,0x0f,
0xb2,0x9d,0x81,0x39,0x44,0x63,0xd7,0x9d,0x7f,0x06,0xa7,0x3c,0x23,0x77,0xfe,
0x38,0x27,0xb4,0xeb,0xbd,0xeb,0x91,0xda,0x94,0x65,0x9a,0x47,0x1d,0xaa,0xb2,
0x3a,0xd9,0x9c,0x75,0x8e,0x6b,0xcb,0xf4,0x7d,0x95,0x12,0x0e,0x9f,0xc7,0x6f,
0x33,0xa7,0x9f,0xf5,0x0d,0xaf,0xa7,0xeb,0xc3,0xc2,0x74,0x9b,0x4d,0x4d,0x7e,
0x4a,0x26,0xb7,0x3c,0x83,0x12,0xc3,0x66,0x84,0x1d,0xbd,0x7b,0xa8,0xa2,0xe9,
0x4a,0x8e,0x8d,0x5a,0xc3,0xe1,0x67,0x5b,0xaa,0xce,0x2a,0xeb,0xf8,0x7c,0xe8,
0xb1,0x66,0x64,0xb0,0x06,0x00,0x87,0x9f,0x52,0x4a
};
char *read_data_buffer(void) {
uLongf size = 245;
Bytef *buffer = malloc(245);
if (buffer == NULL) return(NULL);
if (uncompress(buffer, &size, data_buffer, 220) != Z_OK) {
fprintf(stderr, "uncompress failed");
free(buffer);
return(NULL);
}
if (size != 225) {
fprintf(stderr, "uncompress failed");
free(buffer);
return(NULL);
}
buffer[225] = '\0';
return(buffer);
}
-------------------------------------------------
Daniel
-- Daniel.Veillard@w3.org | W3C MIT/LCS NE43-344 | Today's Bookmarks : Tel : +1 617 253 5884 | 545 Technology Square | Linux, WWW, rpm2html, Fax : +1 617 258 5999 | Cambridge, MA 02139 USA | badminton, Kaffe, http://www.w3.org/People/W3Cpeople.html#Veillard | HTTP-NG and Amaya.
This archive was generated by hypermail 2b29 : Thu May 10 2001 - 18:40:08 EDT