[Scilab-users] compilation with OCaml 4.06

classic Classic list List threaded Threaded
6 messages Options
Florian Blachère-2 Florian Blachère-2
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] compilation with OCaml 4.06

Hello,

Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using
OCaml 4.06 because this release remove the Num library
(https://ocaml.org/releases/4.06.html#Changes,
https://github.com/ocaml/ocaml/pull/1178), do you have any advice to
build Scilab with recent OCaml: integrate Num in Scilab, build Num
oustside of Scilab and link against it, ... ?

Thanks by advance,

Florian

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: compilation with OCaml 4.06

Hello Florian,

The easier would be to depend on the external Num library for the 6.0.x family as far as this
library remains available; statically build against it is the way to go for OCaml code. Num might
also be packaged in your system, use ocamlfind to look for it.

Thanks,

--
Clément

Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :

> Hello,
>
> Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using
> OCaml 4.06 because this release remove the Num library
> (https://ocaml.org/releases/4.06.html#Changes        ,
> https://github.com/ocaml/ocaml/pull/1178), do you have any advice to
> build Scilab with recent OCaml: integrate Num in Scilab, build Num
> oustside of Scilab and link against it, ... ?
>
> Thanks by advance,
>
> Florian
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Florian Blachère-2 Florian Blachère-2
Reply | Threaded
Open this post in threaded view
|

Re: compilation with OCaml 4.06

Hello Clément,

Thanks for the answer, I installed num and changed the compilation line to use ocamlfind but now the compilation fails with :

ocamlfind ocamlopt -package num -I ./src/modelica_compiler -I ./src/xml2modelica -c src/modelica_compiler/optimization.ml
File "src/modelica_compiler/optimization.ml", line 166, characters 21-22:
Error: This expression has type string but an expression was expected of type
         bytes

Is it link to the uodate to OCaml 4.06 ?

Florian

On 21/02/18 11:51, Clément David wrote:
Hello Florian,

The easier would be to depend on the external Num library for the 6.0.x family as far as this
library remains available; statically build against it is the way to go for OCaml code. Num might
also be packaged in your system, use ocamlfind to look for it.

Thanks,

--
Clément

Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :
Hello,

Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using 
OCaml 4.06 because this release remove the Num library 
(https://ocaml.org/releases/4.06.html#Changes	, 
https://github.com/ocaml/ocaml/pull/1178), do you have any advice to 
build Scilab with recent OCaml: integrate Num in Scilab, build Num 
oustside of Scilab and link against it, ... ?

Thanks by advance,

Florian

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: compilation with OCaml 4.06

Hello Florian,

Please find attached a patch that fix this issue; it comes from a OCaml 4.0.4 change which
distinguish String and Bytes implementations and the unsafe-string flag.

Quoting the documentation [1]:
> OCaml strings used to be modifiable in place, for instance via the String.set and String.blit
> functions described below. This usage is deprecated and only possible when the compiler is put
> in "unsafe-string" mode by giving the -unsafe-string command-line option

[1]: https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html

Regards,

--
Clément

Le jeudi 22 février 2018 à 09:35 +0100, Florian Blachère a écrit :

> Hello Clément,
>
> Thanks for the answer, I installed num and changed the compilation line to use ocamlfind but now
> the compilation fails with :
>
> ocamlfind ocamlopt -package num -I ./src/modelica_compiler -I ./src/xml2modelica -c
> src/modelica_compiler/optimization.ml
> File "src/modelica_compiler/optimization.ml", line 166, characters 21-22:
> Error: This expression has type string but an expression was expected of type
>          bytes
>
> Is it link to the uodate to OCaml 4.06 ?
>
> Florian
>
> On 21/02/18 11:51, Clément David wrote:
> > Hello Florian,
> >
> > The easier would be to depend on the external Num library for the 6.0.x family as far as this
> > library remains available; statically build against it is the way to go for OCaml code. Num
> > might
> > also be packaged in your system, use ocamlfind to look for it.
> >
> > Thanks,
> >
> > --
> > Clément
> >
> > Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :
> > > Hello,
> > >
> > > Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using
> > > OCaml 4.06 because this release remove the Num library
> > > (https://ocaml.org/releases/4.06.html#Changes class="Apple-tab-span" style="white-space:pre">
> > > ,
> > > https://github.com/ocaml/ocaml/pull/1178), do you have any advice to
> > > build Scilab with recent OCaml: integrate Num in Scilab, build Num
> > > oustside of Scilab and link against it, ... ?
> > >
> > > Thanks by advance,
> > >
> > > Florian
> > >
> > > _______________________________________________
> > > users mailing list
> > > [hidden email]
> > > http://lists.scilab.org/mailman/listinfo/users
> >
> > _______________________________________________
> > users mailing list
> > [hidden email]
> > http://lists.scilab.org/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

scilab-0004-Fix-build-with-ocaml-4.0.4.patch (1K) Download Attachment
Florian Blachère-2 Florian Blachère-2
Reply | Threaded
Open this post in threaded view
|

Re: compilation with OCaml 4.06

Hello,

Thanks for this patch, but it seems not enough to build as there is still some errors with Bytes/Strings:

File "src/modelica_compiler/optimization.ml", line 168, characters 49-50:
Error: This expression has type bytes but an expression was expected of type
         string

Florian

On 22/02/18 10:41, Clément David wrote:
Hello Florian,

Please find attached a patch that fix this issue; it comes from a OCaml 4.0.4 change which
distinguish String and Bytes implementations and the unsafe-string flag.

Quoting the documentation [1]:
OCaml strings used to be modifiable in place, for instance via the String.set and String.blit
functions described below. This usage is deprecated and only possible when the compiler is put 
in "unsafe-string" mode by giving the -unsafe-string command-line option
[1]: https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html

Regards,

--
Clément

Le jeudi 22 février 2018 à 09:35 +0100, Florian Blachère a écrit :
Hello Clément,

Thanks for the answer, I installed num and changed the compilation line to use ocamlfind but now
the compilation fails with : 

ocamlfind ocamlopt -package num -I ./src/modelica_compiler -I ./src/xml2modelica -c
src/modelica_compiler/optimization.ml
File "src/modelica_compiler/optimization.ml", line 166, characters 21-22:
Error: This expression has type string but an expression was expected of type
         bytes

Is it link to the uodate to OCaml 4.06 ?

Florian

On 21/02/18 11:51, Clément David wrote:
Hello Florian,

The easier would be to depend on the external Num library for the 6.0.x family as far as this
library remains available; statically build against it is the way to go for OCaml code. Num
might
also be packaged in your system, use ocamlfind to look for it.

Thanks,

--
Clément

Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :
Hello,

Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using 
OCaml 4.06 because this release remove the Num library 
(https://ocaml.org/releases/4.06.html#Changes class="Apple-tab-span" style="white-space:pre">
	, 
https://github.com/ocaml/ocaml/pull/1178), do you have any advice to 
build Scilab with recent OCaml: integrate Num in Scilab, build Num 
oustside of Scilab and link against it, ... ?

Thanks by advance,

Florian

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Florian Blachère-2 Florian Blachère-2
Reply | Threaded
Open this post in threaded view
|

Re: compilation with OCaml 4.06

Hello,

Any news about this error ?

Thanks by advance,
Florian

On 26/02/18 09:01, Florian Blachère wrote:
Hello,

Thanks for this patch, but it seems not enough to build as there is still some errors with Bytes/Strings:

File "src/modelica_compiler/optimization.ml", line 168, characters 49-50:
Error: This expression has type bytes but an expression was expected of type
         string

Florian

On 22/02/18 10:41, Clément David wrote:
Hello Florian,

Please find attached a patch that fix this issue; it comes from a OCaml 4.0.4 change which
distinguish String and Bytes implementations and the unsafe-string flag.

Quoting the documentation [1]:
OCaml strings used to be modifiable in place, for instance via the String.set and String.blit
functions described below. This usage is deprecated and only possible when the compiler is put 
in "unsafe-string" mode by giving the -unsafe-string command-line option
[1]: https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html

Regards,

--
Clément

Le jeudi 22 février 2018 à 09:35 +0100, Florian Blachère a écrit :
Hello Clément,

Thanks for the answer, I installed num and changed the compilation line to use ocamlfind but now
the compilation fails with : 

ocamlfind ocamlopt -package num -I ./src/modelica_compiler -I ./src/xml2modelica -c
src/modelica_compiler/optimization.ml
File "src/modelica_compiler/optimization.ml", line 166, characters 21-22:
Error: This expression has type string but an expression was expected of type
         bytes

Is it link to the uodate to OCaml 4.06 ?

Florian

On 21/02/18 11:51, Clément David wrote:
Hello Florian,

The easier would be to depend on the external Num library for the 6.0.x family as far as this
library remains available; statically build against it is the way to go for OCaml code. Num
might
also be packaged in your system, use ocamlfind to look for it.

Thanks,

--
Clément

Le mercredi 21 février 2018 à 08:41 +0100, Florian Blachère a écrit :
Hello,

Scilab 6.0.0 and 6.0.1 (and the master branch) cannot be build using 
OCaml 4.06 because this release remove the Num library 
(https://ocaml.org/releases/4.06.html#Changes class="Apple-tab-span" style="white-space:pre">
	, 
https://github.com/ocaml/ocaml/pull/1178), do you have any advice to 
build Scilab with recent OCaml: integrate Num in Scilab, build Num 
oustside of Scilab and link against it, ... ?

Thanks by advance,

Florian

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users




_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users