ocamlsdl and lablgl conflict over Raw

Bug #249355 reported by Eric Peterson
10
Affects Status Importance Assigned to Milestone
ocamlsdl (Ubuntu)
Fix Released
Undecided
Unassigned
Hardy
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: libsdl-ocaml

Attempting to compile any OCaml file that uses both lablGL and Sdlgl causes the following error:

The files /usr/lib/ocaml/3.10.0/lablGL/glDraw.cmi
and /usr/lib/ocaml/3.10.0/sdl/sdlgl.cmi make inconsistent assumptions
over interface Raw

This is just because (at least) one package is out of date and needs to be compiled against the later version of the other, but in the meantime we can't compile any programs without installing ocamlsdl and lablgl from source. I am running Ubuntu 8.04, libsdl-ocaml 0.7.2-7, and liblablgl-ocaml 1.03-1.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Yes, ocamlsdl needs to be rebuilt against newer liblablgl-ocaml-dev.
I'm subscribing motu-sru to get a go-ahead (or otherwise) for the rebuild.
For intrepid ocamlsdl and lablgl are (still) correctly in sync.

Changed in ocamlsdl:
status: New → Confirmed
status: New → Confirmed
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Can you please provide a very simple test case, as well as a step-by-step instructions, that will cause such an error?

Changed in ocamlsdl:
status: Confirmed → Incomplete
Changed in ocamlsdl:
status: Confirmed → Fix Released
Revision history for this message
Eric Peterson (epeters3) wrote :

Attached is a simple OCamlSDL program that causes the problem; it can be compiled with

ocamlc -c -g -I /usr/lib/ocaml/3.10.0/sdl -I +lablGL Bug.ml

and that command should error out with

The files /usr/lib/ocaml/3.10.0/lablGL/glDraw.cmi
and /usr/lib/ocaml/3.10.0/sdl/sdlgl.cmi make inconsistent assumptions
over interface Raw

When this error is fixed, you can link it using

ocaml -I /usr/lib/ocaml/3.10.0/sdl -I +lablGL -g bigarray.cma sdl.cma lablgl.cma sdlloader.cma -o bug Bug.cmo

and run it using

./bug

Upon successfully compiling, linking, and executing, it should draw a colorful triangle in a fresh OpenGL window and quit when the user presses 'q'.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Thanks, thats exactly what we needed. motu-sru, can we now go on?

Changed in ocamlsdl:
status: Incomplete → Confirmed
Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

ACK.

Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

There appears to be a few typos in your sample (along with some typos in your instructions). I've never programmed in caml before but I think I've been able to fix them.

TEST CASE:
1. Install ocaml-nox libsdl-ocaml-dev liblablgl-ocaml-dev
2. Download my Bug.ml
2. Run ocamlc -c -g -I /usr/lib/ocaml/3.10.0/sdl -I +lablGL Bug.ml
3. The following error should be produced:

"The files /usr/lib/ocaml/3.10.0/lablGL/glDraw.cmi
and /usr/lib/ocaml/3.10.0/sdl/sdlgl.cmi make inconsistent assumptions
over interface Raw"

4. Install rebuilt package from -proposed.
5. Run ocamlc -c -g -I /usr/lib/ocaml/3.10.0/sdl -I +lablGL Bug.ml
6. The command should return silently.
7. Run ocamlc -I /usr/lib/ocaml/3.10.0/sdl -I +lablGL -g bigarray.cma sdl.cma lablgl.cma sdlloader.cma -o bug Bug.cmo
8. The command should return silently.
9. Run ./bug and a window should be appear with a multicoloured/rainbow triangle.
10. With the window focused, press q to exit/quit.

Revision history for this message
Eric Peterson (epeters3) wrote :

Sounds right. My apologies if there were typos; I couldn't successfully compile it to check. ;)

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ocamlsdl:
status: Confirmed → Fix Committed
Revision history for this message
Albert Damen (albrt) wrote :

This looks strange to me: the rebuilt version in Hardy-proposed seems to be a rebuild from Intrepid, not from Hardy:

libsdl-ocaml-dev | 0.7.2-7 | hardy/universe | amd64, i386
libsdl-ocaml-dev | 0.7.2-8 | intrepid/universe | amd64, i386
libsdl-ocaml-dev | 0.7.2-8build1 | hardy-proposed/universe | amd64, i386

so now hardy-proposed has a higher version than intrepid, and more changes than just a rebuild. I noticed this because installing the version from hardy-proposed pulled in several new dependencies, which is a change in libsdl-ocaml-dev 0.7.2-8.

Other than that, the fix itself worked and using the -proposed version I could build and run the ./bug binary.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Thanks for spotting that Albert. I have now uploaded the correct version (0.7.2-7build1).

Changed in ocamlsdl:
status: Fix Committed → Confirmed
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Having talked with pitti, its actually better to leave this upload as is. The new changes are not intrepid specific and the dependencies which are being dragged in are not hurting, quite the contrary.

Changed in ocamlsdl:
status: Confirmed → Fix Committed
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Forgot to mention that if and when this goes to -updates, we will have to bump the intrepid version, since we need to link with ocaml 3.10.2 there (or sync a new version if available from Debian).
We need 3 positive reports for this to go to -updates anyhow and we only have one so far.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Following procedure listed in TEST CASE, I was able to run ./bug as expected.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in ocamlsdl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.