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

compiling with icc on IA32 #2586

Closed
vicuna opened this issue May 17, 2004 · 1 comment
Closed

compiling with icc on IA32 #2586

vicuna opened this issue May 17, 2004 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented May 17, 2004

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

Bug description

Full_Name: David Monniaux
Version: 3.07pl2
OS: Linux
Submission from: massena-8-82-225-77-14.fbx.proxad.net (82.225.77.14)

icc (Intel C Compiler v8.0pl66) refuses to compile OCaml because byterun/sys.c
declares:
extern char * sys_errlist []; :
sys.c(76): error: declaration is incompatible with "const char *const
sys_errlist[]" (declared at line 28 of "/usr/include/bits/sys_errlist.h")

Some "const" could perhaps be added, or the right header file included without
further redeclaration.

But that's not all:
../boot/ocamlrun ../boot/ocamlc -g -warn-error A -nostdlib -nopervasives -c
pervasives.mli
make[1]: *** [pervasives.cmi] Segmentation fault

I'm at a loss whether this is a bug in OCaml or in icc. Using icc -U__GNUC__ (or
probably icc -no-gcc) solves the problem. Apparently, OCaml tries to use some
GNU C-specific trick, and icc, which pretends to be GNU C since it supports some
of the GNU extension, fails to do the right thing. Alternatively, OCaml may rely
on some undocumented behavior of GNU C.

icc may be detected by the __INTEL_COMPILER define.

If I have time, I'll try to locate which GNU C feature usage causes the
problems.

@vicuna
Copy link
Author

vicuna commented Jun 12, 2004

Comment author: administrator

Fixed 2004-60-12 by XL

@vicuna vicuna closed this as completed Jun 12, 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