Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrapping: lexer.ml - index out of bounds #2573

Closed
vicuna opened this issue May 12, 2004 · 7 comments
Closed

bootstrapping: lexer.ml - index out of bounds #2573

vicuna opened this issue May 12, 2004 · 7 comments
Labels

Comments

@vicuna
Copy link

vicuna commented May 12, 2004

Original bug ID: 2573
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Markus Doehr
Version: 3.07 and CVS
OS: Solaris 5.8/x86
Submission from: 217.6.132.82 (217.6.132.82)

I'm trying to bootstrap the ocaml distribution on SunOS 5.8/x86 using gcc.

./configure --preifx=/opt/ocaml

Configuring for a i386-pc-solaris2.8 ...
gcc found
The C compiler is ANSI-compliant.
Checking the sizes of integers and pointers...
OK, this is a regular 32 bit architecture.
64-bit "long long" integer type found (printf with "%ll").
This is a little-endian architecture.
Doubles can be word-aligned.
64-bit integers can be word-aligned.
Native division and modulus have round-towards-zero semantics, will use them.
ranlib found
#! appears to work in shell scripts
POSIX signal handling found.
strerror() found.
times() found.
termcap functions found (with libraries '-lcurses')
You have BSD sockets (with libraries '-lnsl -lsocket')
socklen_t is defined in <sys/socket.h>
IPv6 is supported.
unistd.h found.
off_t is defined in <sys/types.h>
dirent.h found.
rewinddir() found.
lockf() found.
mkfifo() found.
getcwd() found.
getwd() found.
getpriority() found.
utime() found.
utimes() found.
dup2() found.
fchmod() found.
truncate() found.
sys/select.h found.
select() found.
symlink() found.
waitpid() found.
wait4() found.
getgroups() found.
POSIX termios found.
setitimer() found.
gethostname() found.
uname() found.
gettimeofday() found.
mktime() found.
setsid() found.
putenv() found.
setlocale() and <locale.h> found.
dlopen() found in -ldl.
Dynamic loading of shared libraries is supported.
mmap() found.
gethostbyname_r() found (with 5 arguments).
gethostbyaddr_r() found (with 7 arguments).
Replay debugger supported.
Cannot detect system stack overflow.
POSIX threads library supported.
Options for linking with POSIX threads: -lpthread -lposix4
sigwait() found
Bytecode threads library supported.
Location of X11 include files: /usr/include/X11
Options for linking with X11: -lX11
NDBM found (in /usr/include)
Configuring LablTk...
tcl.h not found.
Configuration failed, LablTk will not be built.

** Configuration summary **

Directories where Objective Caml will be installed:
binaries.................. /opt/ocaml/bin
standard library.......... /opt/ocaml/lib/ocaml
manual pages.............. /opt/ocaml/man (with extension .1)
Configuration for the bytecode compiler:
C compiler used........... gcc
options for compiling..... -fno-defer-pop -Wall -Wno-unused
-D_FILE_OFFS
ET_BITS=64 -D_REENTRANT
options for linking....... -lnsl -lsocket -lm -ldl -lcurses
-lpthread
-lposix4
shared libraries are supported
options for compiling..... -fPIC -fno-defer-pop -Wall -Wno-unused
-D_FIL
E_OFFSET_BITS=64 -D_REENTRANT
command for building...... gcc -shared -o lib.so -R/a/path objs
Configuration for the native-code compiler:
hardware architecture..... i386
OS variant................ solaris
C compiler used........... gcc
options for compiling..... -Wall -Wno-unused -D_FILE_OFFSET_BITS=64
-D_R
EENTRANT
options for linking....... -lnsl -lsocket -lm
assembler ................ $(AS)
preprocessed assembler ... /usr/ccs/bin/as -P -DSYS_$(SYSTEM)
profiling with gprof ..... not supported
ocamlopt -pack ........... not supported (no binutils)
Source-level replay debugger: supported
Additional libraries supported:
unix str num dynlink bigarray systhreads threads graph dbm
Configuration for the "num" library:
target architecture ...... ia32 (asm level 1)
Configuration for the "graph" library:
options for compiling ....
options for linking ...... -lX11
The "labltk" library: not found

gmake world.opt

[...]

../ocamlcomp.sh -c -warn-error A -I ../utils -I ../parsing -I ../typing -I
../by
tecomp -I ../toplevel -I ../otherlibs/unix -I ../otherlibs/dynlink lexer.ml
Fatal error: exception Invalid_argument("index out of bounds")
gmake[1]: *** [lexer.cmo] Error 2
gmake[1]: Leaving directory `/home/mldonkey/ocaml/debugger'
gmake: *** [ocamldebugger] Error 2

This happens with the following compilers:

gcc-2.95.2
gcc-2.95.3
gcc-3.3.1
gcc-3.3.2
gcc-3.3.3
gcc-3.4.0
native cc: Sun WorkShop 6 update 2 C 5.3 Patch 111680-09 2003/05/18
native cc: Sun C 5.6 DEV 2004/03/01

I also tried with binutils and gnu as but same result.

Older versions (3.04) are beeing bootstrapped like this without any problems.

uname -a

SunOS sapdb 5.8 Generic_117001-03 i86pc i386 i86pc

@vicuna
Copy link
Author

vicuna commented May 12, 2004

Comment author: administrator

Full_Name: Markus Doehr
Version: 3.07 and CVS
OS: Solaris 5.8/x86
Submission from: 217.6.132.82 (217.6.132.82)

I'm trying to bootstrap the ocaml distribution on SunOS 5.8/x86 using gcc.

./configure --preifx=/opt/ocaml

Configuring for a i386-pc-solaris2.8 ...
[...]
options for linking ...... -lX11
The "labltk" library: not found

gmake world.opt

The error you reported sounds to me as if you where using old libraries
to compile the new system. You should try to reinstall the Caml system
from scratch (removing lib and bin directories, generally in directory
/usr/local/lib/ocaml and /usr/local/bin/ocaml*). This should solve
your problem.

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/

@vicuna
Copy link
Author

vicuna commented May 13, 2004

Comment author: administrator

Hey Paul,

The error you reported sounds to me as if you where using old
libraries to compile the new system. You should try to
reinstall the Caml system from scratch (removing lib and bin
directories, generally in directory /usr/local/lib/ocaml and
/usr/local/bin/ocaml*). This should solve your problem.

thank you for replying.

The system is totally naked - I downloade the ocaml-3.07p1.tar.gz and
started from scratch. There's nothing in /usr/local that would cause this
error.

make bootstrap works

make opt works too

make opt.opt

fails with the error stated.

--
Markus Doehr

@vicuna
Copy link
Author

vicuna commented May 13, 2004

Comment author: administrator

The system is totally naked - I downloade the ocaml-3.07p1.tar.gz and
started from scratch. There's nothing in /usr/local that would cause
this
error.

Note that "3.07p1" is not the latest stable release. You should
use 3.07pl2:
< http://caml.inria.fr/distrib/ocaml-3.07/ocaml-3.07pl2.tar.gz >

-- Damien

@vicuna
Copy link
Author

vicuna commented May 13, 2004

Comment author: administrator

Note that "3.07p1" is not the latest stable release. You
should use 3.07pl2:
< http://caml.inria.fr/distrib/ocaml-3.07/ocaml-3.07pl2.tar.gz >

Same with this version - also CVS...

--
Markus

@vicuna
Copy link
Author

vicuna commented Jul 1, 2004

Comment author: administrator

Sorry I didn't see this was a Solaris problem earlier.
I'm myself using a Solaris/x86 for ocaml development, without any problems.

uname -a

SunOS sapdb 5.8 Generic_117001-03 i86pc i386 i86pc

I remember problems with early versions of solaris 8, which resulted in
segementation faults when compiling
ocaml.
This was solved by applying all recommended patches. But your version number is
so high that this does not
seem to be the problem. Yet, make sure that all recommended patches were
installed.

Another potential issue might be the locale. You may try to compile setting
LC_ALL to C.

Since I'm bootstrapping quite frequently, with various versions of gcc (recently
3.3.3), and never experienced
such problems, I cannot help you much more.

Jacques

@vicuna
Copy link
Author

vicuna commented Jul 1, 2004

Comment author: administrator

Hi Jacques,

Another potential issue might be the locale. You may try to
compile setting LC_ALL to C.

you won't believe it but that was it!!! :-)

Setting LC_ALL to C finally compiled everything fine and I was able to build
lablgtk.

Thank you VERY VERY much! :-)

--
Markus

@vicuna
Copy link
Author

vicuna commented Jul 2, 2004

Comment author: administrator

Could not reproduce on SunOS 5.8 Generic_108529-29 i86pc.
Seems connected to LC_ALL settings (??)

@vicuna vicuna closed this as completed Jul 2, 2004
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant