ULTRIX 3.1D: Unterschied zwischen den Versionen
Luna (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Luna (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 138: | Zeile 138: | ||
then TERM=vt100; export TERM | then TERM=vt100; export TERM | ||
fi | fi | ||
------------- | |||
symlink /usr/lib/libi.a to /usr/lib/libiconv_ult.a | |||
if setlocale is undefined link with this library | |||
for some reason gcc doesn't want to link just to libi.a | |||
------------- | ------------- | ||
Zeile 161: | Zeile 167: | ||
/* Return the starting address of string S2 in S1; | /* Return the starting address of string S2 in S1; | ||
return 0 if it is not found. */ | return 0 if it is not found. */ | ||
char * | char * | ||
strstr (s1, s2) | strstr (s1, s2) | ||
Zeile 171: | Zeile 176: | ||
char *p2; | char *p2; | ||
char *s = s1; | char *s = s1; | ||
for (p2 = s2, i = 0; *s; p2 = s2, i++, s++) | for (p2 = s2, i = 0; *s; p2 = s2, i++, s++) | ||
{ | { | ||
Zeile 181: | Zeile 185: | ||
if (!*p2) | if (!*p2) | ||
return s1 + i; | return s1 + i; | ||
return 0; | return 0; | ||
} | } | ||
Zeile 188: | Zeile 191: | ||
Building some GNU software: | Building some GNU software: | ||
'''GCC:''' | |||
start with gcc-1.42 | start with gcc-1.42 | ||
Zeile 198: | Zeile 203: | ||
build gcc in steps: | build gcc in steps: | ||
make "CC=/usr/local/bin/gcc" LANGUAGES=c | make "CC=/usr/local/bin/gcc" LANGUAGES=c | ||
make stage1 | |||
make stage1 | make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" | ||
make stage2 | |||
make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" | make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" | ||
make compare | |||
make stage2 | make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES=c | ||
make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" | |||
make compare | |||
make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES=c | |||
Zeile 221: | Zeile 220: | ||
note: changing original 25 year old header files is really ugly | note: changing original 25 year old header files is really ugly | ||
#ifndef size_t_defined | #ifndef size_t_defined | ||
typedef int size_t; | typedef int size_t; | ||
#define size_t_defined | #define size_t_defined | ||
#endif | #endif | ||
binutils 2.7 | '''binutils 2.7''' | ||
incorrectly includes stdlib.h in binutils-2.7/binutils/arlex.c | incorrectly includes stdlib.h in binutils-2.7/binutils/arlex.c | ||
on line 556. | on line 556. | ||
Zeile 234: | Zeile 233: | ||
gcc-2.7.2.3 | '''gcc-2.7.2.3''' | ||
incorrectly includes stdlib.h in ../gcc-2.7.2.3/cpplib.c | incorrectly includes stdlib.h in ../gcc-2.7.2.3/cpplib.c | ||
on line 73. | on line 73. | ||
sed-3.02 | '''sed-3.02''' | ||
add to sed/utils.h: | add to sed/utils.h: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
make-3.76 | '''make-3.76''' | ||
texinfo-4.8: | '''texinfo-4.8:''' | ||
add to lib/strdup.c: | add to lib/strdup.c: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 251: | Zeile 250: | ||
needs #include <missing_strstr.h> | needs #include <missing_strstr.h> | ||
'''unzip-5.52:''' | |||
unzip-5.52 | |||
filio.c needs #include <missing_strerror.h> | filio.c needs #include <missing_strerror.h> | ||
make ultrix | make ultrix | ||
bison-1.28 | '''bison-1.28''' | ||
vim-4.6 | '''vim-4.6:''' | ||
main.c | main.c | ||
#include <ctype.h> | #include <ctype.h> | ||
Zeile 269: | Zeile 263: | ||
m4-1.4.3 --disable-nls | '''m4-1.4.3:''' | ||
--disable-nls | |||
bash-2.03 | '''bash-2.03:''' | ||
--disable-nls | --disable-nls | ||
save /bin/sh to /bin/sh.ultrix | save /bin/sh to /bin/sh.ultrix | ||
copy /usr/local/bin/bash to /bin/bash and /bin/sh | copy /usr/local/bin/bash to /bin/bash and /bin/sh | ||
zlib-1.2.8 | '''zlib-1.2.8:''' | ||
does not copy zlib.h and zconf.h | does not copy zlib.h and zconf.h | ||
Copy by hand! | Copy by hand! | ||
readline-5.2: | '''readline-5.2:''' | ||
xmalloc.h: | xmalloc.h: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 292: | Zeile 287: | ||
libiconv-1.9.2: | '''libiconv-1.9.2:''' | ||
--disable-nls | --disable-nls | ||
srclib/setenv.c: | srclib/setenv.c: | ||
Zeile 298: | Zeile 293: | ||
add #include <sys/types.h> | add #include <sys/types.h> | ||
tin-2.4.4: | '''tin-2.4.4:''' | ||
pcre/dftables.c: | pcre/dftables.c: | ||
Ultrix fopen() doesn't understand argument "wb". | Ultrix fopen() doesn't understand argument "wb". | ||
Zeile 310: | Zeile 305: | ||
bash-2.05b: | '''bash-2.05b:''' | ||
--with-readline --with-installed-readline --disable-nls | --with-readline --with-installed-readline --disable-nls | ||
pdksh-5.2.14: | '''pdksh-5.2.14:''' | ||
--disable-emacs | --disable-emacs | ||
m4-1.4.5: | '''m4-1.4.5:''' | ||
regcomp.c | regcomp.c | ||
Ultrix 3 doesn't know about MB_CUR_MAX | Ultrix 3 doesn't know about MB_CUR_MAX | ||
#define MB_CUR_MAX 1 | #define MB_CUR_MAX 1 | ||
Zeile 332: | Zeile 326: | ||
lib/regex_internal.c: | lib/regex_internal.c: | ||
add: | add: | ||
Zeile 357: | Zeile 350: | ||
gawk-3.0.6 | '''gawk-3.0.6:''' | ||
--disable-nls | --disable-nls | ||
make-3.77: | '''make-3.77:''' | ||
glob/fnmatch.c: | glob/fnmatch.c: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 373: | Zeile 366: | ||
bash-2.05: | '''bash-2.05:''' | ||
locale.c: | locale.c: | ||
#include <ctype.h> | #include <ctype.h> | ||
Zeile 380: | Zeile 373: | ||
gcc-2.8.1: FAIL | '''gcc-2.8.1:''' FAIL | ||
incorrectly includes stdlib.h | incorrectly includes stdlib.h | ||
change HAVE_STDLIB_H in auto-config.h | change HAVE_STDLIB_H in auto-config.h | ||
Zeile 393: | Zeile 386: | ||
patch-2.5.9 | '''patch-2.5.9:''' | ||
dirname.h: | dirname.h: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 402: | Zeile 395: | ||
perl-5.004: FAIL | '''perl-5.004:''' FAIL | ||
Configure -Dcc=gcc to use gcc | Configure -Dcc=gcc to use gcc | ||
In file included from doio.c:21: | In file included from doio.c:21: | ||
Zeile 418: | Zeile 411: | ||
gcc-2.95.3: FAIL | '''gcc-2.95.3:''' FAIL | ||
get libio patch | get libio patch | ||
copy patch to libio dir | copy patch to libio dir | ||
Zeile 455: | Zeile 448: | ||
bzip2-1.0.6: | '''bzip2-1.0.6:''' | ||
change all remove() to unlink() in bzip2.c | change all remove() to unlink() in bzip2.c | ||
#include <missing_strstr.h> | #include <missing_strstr.h> | ||
Zeile 466: | Zeile 459: | ||
make-3.79.1: | '''make-3.79.1:''' | ||
glob/fnmatch.c: | glob/fnmatch.c: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 479: | Zeile 472: | ||
bash-3.2: | '''bash-3.2:''' | ||
needs #include <sys/time.h> in readline/history.h | needs #include <sys/time.h> in readline/history.h | ||
needs a few #inlcude <sys/types.h> for undefined size_t etc. | needs a few #inlcude <sys/types.h> for undefined size_t etc. | ||
Zeile 491: | Zeile 484: | ||
jpeg-6b: | '''jpeg-6b:''' | ||
just plain compile. Do not use libtool. Libtool will fail. | just plain compile. Do not use libtool. Libtool will fail. | ||
The rest works and builds fine. | The rest works and builds fine. | ||
jasper-1.900.1: FAIL | '''jasper-1.900.1:''' FAIL | ||
src/libjasper/include/jasper: | src/libjasper/include/jasper: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 512: | Zeile 505: | ||
mips-dec-ultrix3.1-gcc -g -O2 -o jasper jasper.o ../libjasper/.libs/libjasper.a -lm | mips-dec-ultrix3.1-gcc -g -O2 -o jasper jasper.o ../libjasper/.libs/libjasper.a -lm | ||
../libjasper/.libs/libjasper.a(jas_init.o): In function `jas_init': | ../libjasper/.libs/libjasper.a(jas_init.o): In function `jas_init': | ||
jas_init.c:154: undefined reference to `atexit' | jas_init.c:154: undefined reference to `atexit' | ||
../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_delcmpt': | ../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_delcmpt': | ||
jas_image.c:649: undefined reference to `memmove' | jas_image.c:649: undefined reference to `memmove' | ||
../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_addcmpt': | ../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_addcmpt': | ||
jas_image.c:676: undefined reference to `memmove' | jas_image.c:676: undefined reference to `memmove' | ||
../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_copycmpt': | ../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_copycmpt': | ||
jas_image.c:803: undefined reference to `memmove' | jas_image.c:803: undefined reference to `memmove' | ||
../libjasper/.libs/libjasper.a(jas_cm.o): In function `jas_cmpxformseq_insertpxform': | ../libjasper/.libs/libjasper.a(jas_cm.o): In function `jas_cmpxformseq_insertpxform': | ||
jas_cm.c:669: undefined reference to `memmove' | jas_cm.c:669: undefined reference to `memmove' | ||
../libjasper/.libs/libjasper.a(jas_icc.o): In function `jas_iccattrtab_add': | ../libjasper/.libs/libjasper.a(jas_icc.o): In function `jas_iccattrtab_add': | ||
jas_icc.c:775: undefined reference to `memmove' | jas_icc.c:775: undefined reference to `memmove' | ||
../libjasper/.libs/libjasper.a(jas_icc.o):jas_icc.c:809: more undefined references to `memmove' follow | ../libjasper/.libs/libjasper.a(jas_icc.o):jas_icc.c:809: more undefined references to `memmove' follow | ||
make[2]: *** [jasper] Error 1 | make[2]: *** [jasper] Error 1 | ||
make[2]: Leaving directory `/usr/local/compile/jasper-1.900.1/src/appl' | make[2]: Leaving directory `/usr/local/compile/jasper-1.900.1/src/appl' | ||
make[1]: *** [all-recursive] Error 1 | make[1]: *** [all-recursive] Error 1 | ||
make[1]: Leaving directory `/usr/local/compile/jasper-1.900.1/src' | make[1]: Leaving directory `/usr/local/compile/jasper-1.900.1/src' | ||
make: *** [all-recursive] Error 1 | make: *** [all-recursive] Error 1 | ||
FAILS | FAILS | ||
ncurses-5.9: FAIL | '''ncurses-5.9:''' FAIL | ||
ncurses needs to link with libiconv_ult because of setlocale. | ncurses needs to link with libiconv_ult because of setlocale. | ||
Thomas Dickey proposed setting before configure in the shel environment: | Thomas Dickey proposed setting before configure in the shel environment: | ||
Zeile 570: | Zeile 564: | ||
libtool-1.5.24: FAIL | '''libtool-1.5.24:''' FAIL | ||
ltdl.c: add: | ltdl.c: add: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 579: | Zeile 573: | ||
fileutils-4.1: | '''fileutils-4.1:''' | ||
lib/quotearg.h: | lib/quotearg.h: | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 601: | Zeile 595: | ||
top-3.1: | '''top-3.1:''' | ||
unpack to new dir! | unpack to new dir! | ||
build for 43bsd. | build for 43bsd. | ||
Zeile 607: | Zeile 601: | ||
libpng-1.0.39: | '''libpng-1.0.39:''' | ||
png.c: | png.c: | ||
#include <missing_snprintf.h> | #include <missing_snprintf.h> | ||
Zeile 615: | Zeile 609: | ||
gs6.01: FAIL | '''gs6.01:''' FAIL | ||
fix fopen() argument rb and wb to r+ and w+ in many files | fix fopen() argument rb and wb to r+ and w+ in many files | ||
/usr/include/strings.h:56: conflicting types for `strspn' | |||
/usr/include/strings.h:56: conflicting types for `strspn' | /usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h:64: previous declaration of `strspn' | ||
/usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h:64: previous declaration of `strspn' | /usr/include/strings.h:57: conflicting types for `strcspn' | ||
/usr/include/strings.h:57: conflicting types for `strcspn' | /usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h:65: previous declaration of `strcspn' | ||
/usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h:65: previous declaration of `strcspn' | ./src/gp_unifs.c: In function `gp_enumerate_files_init': | ||
./src/gp_unifs.c: In function `gp_enumerate_files_init': | ./src/gp_unifs.c:206: warning: implicit declaration of function `memcpy' | ||
./src/gp_unifs.c:206: warning: implicit declaration of function `memcpy' | ./src/gp_unifs.c: In function `gp_enumerate_files_next': | ||
./src/gp_unifs.c: In function `gp_enumerate_files_next': | ./src/gp_unifs.c:311: warning: function `memcpy' was previously declared within a block | ||
./src/gp_unifs.c:311: warning: function `memcpy' was previously declared within a block | ./src/gp_unifs.c:313: warning: function `memcpy' was previously declared within a block | ||
./src/gp_unifs.c:313: warning: function `memcpy' was previously declared within a block | ./src/gp_unifs.c:317: warning: function `memcpy' was previously declared within a block | ||
./src/gp_unifs.c:317: warning: function `memcpy' was previously declared within a block | ./src/gp_unifs.c:329: warning: implicit declaration of function `stat' | ||
./src/gp_unifs.c:329: warning: implicit declaration of function `stat' | ./src/gp_unifs.c:402: warning: function `memcpy' was previously declared within a block | ||
./src/gp_unifs.c:402: warning: function `memcpy' was previously declared within a block | make: *** [obj/gp_unifs.o] Error 1 | ||
make: *** [obj/gp_unifs.o] Error 1 | |||
extern unsigned int vs extern int. | extern unsigned int vs extern int. | ||
Zeile 639: | Zeile 632: | ||
'''libidn-1.26:''' FAIL | |||
libidn-1.26: FAIL | |||
gl/version-etc.h | gl/version-etc.h | ||
#include <sys/types.h> | #include <sys/types.h> | ||
Zeile 666: | Zeile 658: | ||
vim-5.8: FAIL | '''vim-5.8:''' FAIL | ||
--enable-gui=no --disable-gpm --without-x mips-dec-ultrix3.1 | --enable-gui=no --disable-gpm --without-x mips-dec-ultrix3.1 | ||
Zeile 687: | Zeile 679: | ||
ssh-1.2.32: | '''ssh-1.2.32:''' | ||
compile with X11R4 for --with-x to work! | compile with X11R4 for --with-x to work! | ||
without X11R4 use configure --without-x | without X11R4 use configure --without-x | ||
Zeile 696: | Zeile 688: | ||
tcl-7.3 and tk-3.6 | '''tcl-7.3 and tk-3.6:''' | ||
build both in parallel. | build both in parallel. | ||
tk needs to have tcl in the same dir to build! | tk needs to have tcl in the same dir to build! | ||
Zeile 711: | Zeile 703: | ||
'''X11R4:''' | |||
unpack the distribution files: | unpack the distribution files: | ||
cat *.?? | uncompress | (cd /home/X11R4/; tar xvf -) | cat *.?? | uncompress | (cd /home/X11R4/; tar xvf -) | ||
Zeile 728: | Zeile 720: | ||
xpm-3.4k | '''xpm-3.4k:''' | ||
use Makefile.noX | use Makefile.noX | ||
change CC=cc to gcc | change CC=cc to gcc | ||
Zeile 745: | Zeile 737: | ||
libungif-4.1.4: | '''libungif-4.1.4:''' | ||
fix fopen arguments | fix fopen arguments | ||
util/gif2epsn.c | util/gif2epsn.c | ||
Zeile 786: | Zeile 778: | ||
ghostscript-5.01: FAIL | '''ghostscript-5.01:''' FAIL | ||
fix fopen() | fix fopen() | ||
gs16spl.c | gs16spl.c | ||
Zeile 809: | Zeile 801: | ||
t1lib-5.1.2: | '''t1lib-5.1.2:''' | ||
/lib/type1/t1io.c: | /lib/type1/t1io.c: | ||
#include <missing_strstr.h> | #include <missing_strstr.h> | ||
Zeile 835: | Zeile 827: | ||
xearth-1.1: | '''xearth-1.1:''' | ||
do xmkmf and then edit the Makefile | do xmkmf and then edit the Makefile | ||
needs strftime(). Link with -liconv_ult | needs strftime(). Link with -liconv_ult | ||
xbill-1.1: FAIL | '''xbill-1.1:''' FAIL | ||
do xmkmf and then edit the Makefile | do xmkmf and then edit the Makefile | ||
use Xaw instead of Motif. | use Xaw instead of Motif. | ||
Zeile 847: | Zeile 839: | ||
fvwm-1.24r | '''fvwm-1.24r:''' | ||
use gcc | use gcc | ||
do xmkmf and edit all the Makefiles... | do xmkmf and edit all the Makefiles... | ||
Zeile 858: | Zeile 850: | ||
mutt-1.4.2.3: FAIL | '''mutt-1.4.2.3:''' FAIL | ||
./configure --disable-nls --with-libiconv-prefix=/usr/local --without-wc-funcs mips-de-ultrix3.1 | ./configure --disable-nls --with-libiconv-prefix=/usr/local --without-wc-funcs mips-de-ultrix3.1 | ||
makedoc.c: | makedoc.c: | ||
Zeile 866: | Zeile 858: | ||
zsh-4.3.10: | '''zsh-4.3.10:''' | ||
Src/utils.c: | Src/utils.c: | ||
#define MB_CUR_MAX 1 | #define MB_CUR_MAX 1 |
Version vom 18. März 2019, 19:03 Uhr
ULTRIX 3.1D
Ultrix 3.1D comes with X11R3(exact version?) and only a simple X that only supports the plain color graphics (DS3100 or PMAG-B). Replace with X11R4:
"The XtPointer typedef was added to X11 with Release 4. This error indicates that your system has X11R3 or earlier. You need to update to a more recent edition of X in order to compile NetHack's X11 interface."
copy stddef.h from ULTRIX 4.5...
show all soft/hard errors:
uerf -c err
On ultrix 4.2 we don't have usleep()
in the file clients/olwm/usleep.c
replace the line
return usleep(usec);
with
#ifndef ultrix return usleep(usec); #else return sleep(usec * 1000000); #endif
to enable root logins via telnet or non-secure ports, edit /etc/ttys:
root@minou:/etc# cat ttys # @(#)ttys 1.1 (ULTRIX) 3/2/89 # # # # name getty type status comments # console "/etc/getty std.9600" vt100 on secure # console terminal tty00 "/etc/getty std.9600" vt100 on secure nomodem # direct connect tty tty01 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty tty02 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty tty03 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty tty04 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty tty05 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty tty06 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty tty07 "/etc/getty std.9600" vt100 off secure nomodem # direct connect tty ttyd0 "/etc/getty std.9600" vt100 off shared secure # modem line ttyp0 none network secure ttyp1 none network secure ttyp2 none network secure ttyp3 none network secure ttyp4 none network secure ttyp5 none network secure ttyp6 none network secure ttyp7 none network secure ttyp8 none network secure ttyp9 none network secure ttypa none network secure ttypb none network secure ttypc none network secure ttypd none network secure ttype none network secure ttypf none network secure ttyq0 none network secure ttyq1 none network secure ttyq2 none network secure ttyq3 none network secure ttyq4 none network secure ttyq5 none network secure ttyq6 none network secure ttyq7 none network secure ttyq8 none network secure ttyq9 none network secure ttyqa none network secure ttyqb none network secure ttyqc none network secure ttyqd none network secure ttyqe none network secure ttyqf none network secure # :0 "/usr/bin/login -P /usr/bin/Xprompter -C /usr/bin/dxsession" none on secure window="/usr/bin/Xcfb"
add to /etc/rc.local:
# default route echo 'setting default route' > /dev/console /etc/route add default 192.168.2.253 1 # SSHd echo 'starting SSH daemon' > /dev/console /usr/local/sbin/sshd
error in repaired Ultrix gcc header files:
/usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/sys/dir.h
gcc fixes this to u_long, but does not define it. Add:
#include <sys/types.h>
in many cases, config.guess can't detect the platform. Specify as mips-dec-ultrix3.1
size_t is declared in <sys/types.h>
Ultrix also often needs:
#define NULL 0
.cshrc:
if ($term == xterm-256color) then setenv TERM vt100 endif
.bashrc:
# set a fancy prompt PS1='\u@\h:\w\$ ' export PS1
.profile
if [ $TERM = "xterm-256color" ] then TERM=vt100; export TERM fi
symlink /usr/lib/libi.a to /usr/lib/libiconv_ult.a if setlocale is undefined link with this library for some reason gcc doesn't want to link just to libi.a
strstr.c from GNU tar... copy to /usr/include/missing_strstr.h
/* strstr.c -- return the offset of one string within another Copyright (C) 1989, 1990 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Written by Mike Rendell <michael@cs.mun.ca>. */
/* Return the starting address of string S2 in S1; return 0 if it is not found. */ char * strstr (s1, s2) char *s1; char *s2; { int i; char *p1; char *p2; char *s = s1; for (p2 = s2, i = 0; *s; p2 = s2, i++, s++) { for (p1 = s; *p1 && *p2 && *p1 == *p2; p1++, p2++) ; if (!*p2) break; } if (!*p2) return s1 + i; return 0; }
Building some GNU software:
GCC:
start with gcc-1.42 use gcc to build some older version of tools: sed-1.18, gawk1, bison-1.25, make-3.75 use gcc1 to build gcc2
ultrix 3 doesn't know about atexit(). Remove HAVE_ATEXIT before building gcc.
build gcc in steps:
make "CC=/usr/local/bin/gcc" LANGUAGES=c make stage1 make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" make stage2 make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" make compare make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES=c
gcc-2.3.3 typedefs size_t to long unsigned int in
/usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.3.3/include/stddef.h
/usr/include/sys/types.h defines size_t as "int"
add something like this in both header files: note: changing original 25 year old header files is really ugly
#ifndef size_t_defined typedef int size_t; #define size_t_defined #endif
binutils 2.7
incorrectly includes stdlib.h in binutils-2.7/binutils/arlex.c
on line 556.
and in binutils-2.7/ld/ldlex.c
on line 1212.
gcc-2.7.2.3
incorrectly includes stdlib.h in ../gcc-2.7.2.3/cpplib.c
on line 73.
sed-3.02
add to sed/utils.h:
- include <sys/types.h>
make-3.76
texinfo-4.8: add to lib/strdup.c:
- include <sys/types.h>
- define NULL 0
needs #include <missing_strstr.h>
unzip-5.52: filio.c needs #include <missing_strerror.h> make ultrix
bison-1.28
vim-4.6: main.c
- include <ctype.h>
- include <locale.h>
add EXTRA_LIBS = -liconv (see above for /usr/lib/libi.a)
m4-1.4.3:
--disable-nls
bash-2.03: --disable-nls save /bin/sh to /bin/sh.ultrix copy /usr/local/bin/bash to /bin/bash and /bin/sh
zlib-1.2.8: does not copy zlib.h and zconf.h Copy by hand!
readline-5.2: xmalloc.h:
- include <sys/types.h>
time_t lives in <sys/types.> history.h:
- include <sys/types.h>
wants to build shared libraries for some reason. Edit Makefile and remove TARGETS = shared and INSTALL_TARGETS = install-shared
libiconv-1.9.2:
--disable-nls
srclib/setenv.c:
srclib/unsetenv.c:
add #include <sys/types.h>
tin-2.4.4: pcre/dftables.c: Ultrix fopen() doesn't understand argument "wb". Change to "w+"
add to pcre/pcre_globals.c:
- include <sys/types.h>
extern void *malloc(size_t); extern void *realloc(void *, size_t); extern void free(void *);
bash-2.05b:
--with-readline --with-installed-readline --disable-nls
pdksh-5.2.14:
--disable-emacs
m4-1.4.5:
regcomp.c
Ultrix 3 doesn't know about MB_CUR_MAX
- define MB_CUR_MAX 1
regcomp.c vasnprintf.c
lib/error.c: add:
- include <missing_strerror.h>
lib/regex_internal.c: add:
old m4-1.4.3/src/stackovf.c:
vec.sv_flags = (SV_ONSTACK
- ifdef SV_RESETHAND
| SV_RESETHAND
- endif
);
new m4-1.4.5/src/stackovf.c:
vec.sv_flags = (SV_ONSTACK | SV_RESETHAND);
backport:
vec.sv_flags = (SV_ONSTACK
- ifdef SV_RESETHAND
| SV_RESETHAND
- endif
);
some tests fail with doc/m4.texinfo. This is known. Ignore.
gawk-3.0.6:
--disable-nls
make-3.77:
glob/fnmatch.c:
- include <sys/types.h>
- define NULL 0
function.c and job.c:
- ifndef remove
- define remove unlink
- endif
remove() should remove both files and directories. unlink() only removes files.
bash-2.05:
locale.c:
- include <ctype.h>
- include <locale.h>
- define NULL 0
gcc-2.8.1: FAIL
incorrectly includes stdlib.h
change HAVE_STDLIB_H in auto-config.h
to #undef HAVE_STDLIB_H
change #define HAVE_STDDEF_H 1 to
- undef HAVE_STDDEF_H
Makefile insists on using OLDCC as the MIPS C compiler override host overrides... Not sure if this is a good idea... FAILs compiling enquire.c with ./xgcc
patch-2.5.9: dirname.h:
- include <sys/types.h>
config.h
- define HAVE_STRUCT_UTIMBUF 1
perl-5.004: FAIL Configure -Dcc=gcc to use gcc In file included from doio.c:21: /usr/include/sys/ipc.h:14: redefinition of `struct ipc_perm' In file included from doio.c:26: /usr/include/sys/sem.h:91: redefinition of `struct semid_ds' /usr/include/sys/sem.h:103: redefinition of `struct sem' /usr/include/sys/sem.h:114: redefinition of `struct sem_undo' /usr/include/sys/sem.h:117: redefinition of `struct undo' /usr/include/sys/sem.h:127: redefinition of `struct seminfo' /usr/include/sys/sem.h:144: redefinition of `struct sembuf' make: *** [doio.o] Error 1 compilation FAILED
gcc-2.95.3: FAIL get libio patch copy patch to libio dir apply patch like: /usr/local/bin/patch < libio_patch.txt configure --disable-nls --with-libiconv-prefix=/usr/local --enable-languages=c,c++ mips-dec-ultrix3.1
incorrectly includes stdlib.h change HAVE_STDLIB_H in auto-config.h to #undef HAVE_STDLIB_H change #define HAVE_STDDEF_H 1 to
- undef HAVE_STDDEF_H
libiberty/config.h
- undef HAVE_ATEXIT
- define NEED_ATEXIT 1
change in libiberty/config.h gcc/auto-host.h
FAILS in stage1: ln -s .././../gcc-2.95.3/gcc/../libiberty/obstack.c obstack.c stage1/xgcc -Bstage1/ -B/usr/local/mips-dec-ultrix3.1/bin/ -c -DIN_GCC -O2 -g -O2 -DHAVE_CONFIG_H -I. -I.././../gcc-2.95.3/gcc -I.././../gcc-2.95.3/gcc/config -I.././../gcc-2.95.3/gcc/../include obstack.c stage1/xgcc -Bstage1/ -B/usr/local/mips-dec-ultrix3.1/bin/ -DIN_GCC -O2 -g -O2 -DHAVE_CONFIG_H -o gencheck \
gencheck.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac ` ` case "" in ?*) echo ;; esac `
stage1/libgcc.a(__main.o): In function `__do_global_ctors': /usr/local/compile/gcc-2.95.3bin/gcc/.././../gcc-2.95.3/gcc/libgcc2.c(.text+0xf0): undefined reference to `atexit' collect2: ld returned 1 exit status make[2]: *** [gencheck] Error 1 make[2]: Leaving directory `/usr/local/compile/gcc-2.95.3bin/gcc' make[1]: *** [bootstrap] Error 2 make[1]: Leaving directory `/usr/local/compile/gcc-2.95.3bin/gcc' make: *** [bootstrap] Error 2
bzip2-1.0.6:
change all remove() to unlink() in bzip2.c
- include <missing_strstr.h>
- include <missing_memmove.h>
- include <missing_strerror.h>
delete "-f" from Makefile fopen() doesn't know about the argument rb or wb. Change to r+ an w+ also check for other open() like bzopen()
make-3.79.1: glob/fnmatch.c:
- include <sys/types.h>
- define NULL 0
do not strip the make binary. this breaks make.
function.c and job.c:
- ifndef remove
- define remove unlink
- endif
fix like make-3.77. Works.
bash-3.2:
needs #include <sys/time.h> in readline/history.h
needs a few #inlcude <sys/types.h> for undefined size_t etc.
- undef HAVE_LOCAL_H
strftime.c
- include <sys/types.h>
- include <time.h>
- include <sys/time.h>
Ultrix 3 does only have tzset() in a kernel sysV Envrionment. It is only used in strftime.c, so uncomment all tzset().
jpeg-6b:
just plain compile. Do not use libtool. Libtool will fail.
The rest works and builds fine.
jasper-1.900.1: FAIL
src/libjasper/include/jasper:
- include <sys/types.h>
extern void *malloc(size_t); extern void *realloc(void *, size_t); extern void free(void *);
- define EXIT_FAILURE 1 /* Failing exit status. */
- define EXIT_SUCCESS 0 /* Successful exit status. */
imgcmp.c imginfo.c jasper.c jiv.c
mips-dec-ultrix3.1-gcc -g -O2 -o jasper jasper.o ../libjasper/.libs/libjasper.a -lm ../libjasper/.libs/libjasper.a(jas_init.o): In function `jas_init': jas_init.c:154: undefined reference to `atexit' ../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_delcmpt': jas_image.c:649: undefined reference to `memmove' ../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_addcmpt': jas_image.c:676: undefined reference to `memmove' ../libjasper/.libs/libjasper.a(jas_image.o): In function `jas_image_copycmpt': jas_image.c:803: undefined reference to `memmove' ../libjasper/.libs/libjasper.a(jas_cm.o): In function `jas_cmpxformseq_insertpxform': jas_cm.c:669: undefined reference to `memmove' ../libjasper/.libs/libjasper.a(jas_icc.o): In function `jas_iccattrtab_add': jas_icc.c:775: undefined reference to `memmove' ../libjasper/.libs/libjasper.a(jas_icc.o):jas_icc.c:809: more undefined references to `memmove' follow make[2]: *** [jasper] Error 1 make[2]: Leaving directory `/usr/local/compile/jasper-1.900.1/src/appl' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/compile/jasper-1.900.1/src' make: *** [all-recursive] Error 1
FAILS
ncurses-5.9: FAIL
ncurses needs to link with libiconv_ult because of setlocale.
Thomas Dickey proposed setting before configure in the shel environment:
LIBS="$LIBS -liconv_ult"; export LIBS
fails in form/fty_num.c because of possibly ancient locale.h uncomment this IF:
- if HAVE_LOCALE_H
- define isDecimalPoint(c) ((c) == ((L && L->decimal_point) ? *(L->decimal_point)
: '.'))
use:
- define isDecimalPoint(c) ((c) == '.')
also uncomment:
- if HAVE_LOCALE_H
argn->L = localeconv();
- else
use: argn->L = NULL;
test/dots.c test/dots_mvcur.c
- define STDOUT_FILENO 1 /* Standard output. */
test/ncurses.c
- include <missing_strstr.h>
test/railroad.c
- define STDOUT_FILENO 1 /* Standard output. */
FAILS with tic -x. Probably some unfixed fopen() calls in the sources...
do a "find . -print | xargs grep fopen" and fix fopen arguments still FAILS and can't open terminals.
libtool-1.5.24: FAIL ltdl.c: add:
- include <sys/types.h>
extern void *malloc(size_t); extern void *realloc(void *, size_t); extern void free(void *); FAILS several test. Don't install
fileutils-4.1:
lib/quotearg.h:
- include <sys/types.h>
lib/dirname.c:
- include <sys/types.h>
lib/mbswidth.h
- include <sys/types.h>
lib/xalloc.h
- include <sys/types.h>
lib/strnlen.c
- include <sys/types.h>
src/ls.c: extern int strcoll( const char *__s1, const char *__s2 );
strcoll lives in /usr/lib/libiconv_ult! man/Makefile missing perl wrong. remove man from Makefile rest seems to work fine.
do not strip the fileutils binaries. This breaks some of the tools.
top-3.1:
unpack to new dir!
build for 43bsd.
install group as bin.
libpng-1.0.39:
png.c:
- include <missing_snprintf.h>
fix fopen() argument rb and wb to r+ and w+ pngtest.c example.c
gs6.01: FAIL
fix fopen() argument rb and wb to r+ and w+ in many files
/usr/include/strings.h:56: conflicting types for `strspn' /usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h:64: previous declaration of `strspn' /usr/include/strings.h:57: conflicting types for `strcspn' /usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h:65: previous declaration of `strcspn' ./src/gp_unifs.c: In function `gp_enumerate_files_init': ./src/gp_unifs.c:206: warning: implicit declaration of function `memcpy' ./src/gp_unifs.c: In function `gp_enumerate_files_next': ./src/gp_unifs.c:311: warning: function `memcpy' was previously declared within a block ./src/gp_unifs.c:313: warning: function `memcpy' was previously declared within a block ./src/gp_unifs.c:317: warning: function `memcpy' was previously declared within a block ./src/gp_unifs.c:329: warning: implicit declaration of function `stat' ./src/gp_unifs.c:402: warning: function `memcpy' was previously declared within a block make: *** [obj/gp_unifs.o] Error 1
extern unsigned int vs extern int. fix /usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/string.h to extern int. FAILS.
libidn-1.26: FAIL
gl/version-etc.h
- include <sys/types.h>
lib/tld.c lib/tlds.c
- define NULL 0
src/idn.c src/idn_cmd.c
- define EXIT_FAILURE 1 /* Failing exit status. */
- define EXIT_SUCCESS 0 /* Successful exit status. */
lib/punycode.c
- include <missing_memmove.h>
change Makefile and src/Makefile LIBS = -liberty -liconv_ult
lib/stringprep.h: typedef int ssize_t;
make without doc SUBDIR, because we don't have perl (yet)... FAILs still...
vim-5.8: FAIL
--enable-gui=no --disable-gpm --without-x mips-dec-ultrix3.1
ex_docmd.c:
- include <missing_strstr.h>
link with -liconv_ult, because setlocale is undefined
does not work with --with-tlib=ncurses! let it autodetect termlib
check config.mk: LIBS = -ltermlib -liconv_ult
doesn't do anything: src/main.c src/os_unix.c
- define STDOUT_FILENO 1 /* Standard output. */
FAILS: does not work correctly. Crashes often...
ssh-1.2.32:
compile with X11R4 for --with-x to work!
without X11R4 use configure --without-x
change in config.h:
- undef HAVE_ULTRIX_SHADOW_PASSWORDS
tcl-7.3 and tk-3.6: build both in parallel. tk needs to have tcl in the same dir to build! use gcc
tkWm.c: In function `TkWmMapWindow': tkWm.c:447: `WithdrawnState' undeclared (first use this function)
from linux standard base 4.0: This should be in Xutils.h in well behaved systems:
- define WithdrawnState 0
lives in X11/Xutil.h in X11R4!
X11R4:
unpack the distribution files:
cat *.?? | uncompress | (cd /home/X11R4/; tar xvf -)
some include files seem to live in /usr/include/X11/Xaw, but appear to be expected in /usr/include/X11... fix like: cd /usr/include; ln -s Xaw/Form.h ./ building the core X11 distribution works best with ULTRIX /bin/make building contribs may need GNU make xconsole: errors with line wraps... xlock: life.c: sleep(delay * 1000000000);
X11R4 seems to work fine. Rebuild packages using X with X11R4... remove /usr/local/lib/gcc-lib/mips-dec-ultrix3.1/2.7.2.3/include/X11/Intrinsic.h
xpm-3.4k:
use Makefile.noX
change CC=cc to gcc
change XpmI.h
remove #include <stdlib.h>
add #include <sys/types.h>
FAILS because no X11/extensions/shape.h
CrDatFrI.c:
missing s += strlen(s); at various points
scan.c(.text+0x668): undefined reference to `strdup': link with -liberty
change installation directory to /usr... not /usr/local libXpm.a is not correctly installed. Copy by hand to /usr/lib!
libungif-4.1.4:
fix fopen arguments
util/gif2epsn.c
util/gif2ps.c
util/gif2rgb.c
util/gifasm.c
util/gifbg.c
util/gifclip.c
util/gifcomb.c
util/giffix.c
util/gifflip.c
util/gifhisto.c
util/gifinter.c
util/gifinto.c
util/gifovly.c
util/gifpos.c
util/gifrsize.c
util/giftext.c
util/gifwedge.c
util/raw2gif.c
util/rgb2gif.c
util/text2gif.c
util/gifspnge.c
util/giffiltr.c
util/icon2gif.c
util/gifcolor.c
util/gifinfo.c
util/gifclrmp.c
util/gifrotat.c
util/gif2x11.c
- define EXIT_FAILURE 1 /* Failing exit status. */
- define EXIT_SUCCESS 0 /* Successful exit status. */
link text2gif with -liberty, because it needs strdup(): text2gif.o: In function `main': text2gif.c(.text+0x2e0): undefined reference to `strdup' root@minou:/usr/local/compile/libungif-4.1.4/util# mips-dec-ultrix3.1-gcc -I/usr/local/include -Wall -I/usr/local/include -o text2gif text2gif.o -L/usr/local/lib ../lib/.libs/libungif.a -L/usr/lib -lX11 -liberty ../lib/libgetarg.a
ghostscript-5.01: FAIL fix fopen() gs16spl.c gp_os2.c gp_mswin.c gp_iwatc.c gp_dvx.c gdevcgm.c add to compile flags: -DBSD4_2 adapt makefile
does not work with X11R3? Works with X11R4. gdevxini.c:55: `XtPointer' undeclared here (not in a function) gdevxini.c:55: initializer element for `resources[0].default_addr' is not constant gdevxini.c:119: `XtRFloat' undeclared here (not in a function) gdevxini.c:119: initializer element for `resources[18].resource_type' is not constant
gdevxini.c:
- include <X11/Xlib.h>
- include <X11/StringDefs.h>
still FAILS
t1lib-5.1.2:
/lib/type1/t1io.c:
- include <missing_strstr.h>
fix fopen() bugs in various files
strftime-strftime-release-7.0: provides a replacement for strftime().
ULTRIX only provides tzset in a SystemV environment. Delete all lines with tzset.
copy strftime.c to /usr/include/missing_strftime.h
Surprise! strftime() also exists in libiconv_ult!
freetype-2.1.10:
src/base/ftsystem.c:
- include <unistd.h>
fix fopen() bugs in various files
include/freetype/config/ftstdlib.h:
- include <setjmp.h>
include/freetype/internal/ftvalid.h:
- include <setjmp.h>
parse error in /usr/local/compile/freetype-2.1.10/include/freetype/internal/ftvalid.h FAILS. No solution yet.
xearth-1.1:
do xmkmf and then edit the Makefile
needs strftime(). Link with -liconv_ult
xbill-1.1: FAIL
do xmkmf and then edit the Makefile
use Xaw instead of Motif.
library hell. Lots of undefined X references...
FAILS. Maybe does not work with X11R4?
fvwm-1.24r:
use gcc
do xmkmf and edit all the Makefiles...
modules/FvwmSave/FvwmSave.c:
modules/FvwmSaveDesk/FvwmSaveDesk.c:
fvwm/fvwm.c:
- include <missing_strstr.h>
copy sample.fvwmrc to /usr/local/share
mutt-1.4.2.3: FAIL
./configure --disable-nls --with-libiconv-prefix=/usr/local --without-wc-funcs mips-de-ultrix3.1
makedoc.c:
sy/stat.h cannot be included twice.
remove from lib.h.
FAILs
zsh-4.3.10:
Src/utils.c:
- define MB_CUR_MAX 1