Opened 10 years ago
Closed 6 years ago
#45621 closed defect (wontfix)
unison @2.40.102_2 crashes
Reported by: | Polyergic (Shad Sterling) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mww@…, silencer1127@…, macports@… | |
Port: | unison ocaml |
Description
ran selfupdate
and upgrade outdated
MacPorts base 2.3.1 was updated to MacPorts base 2.3.2 ocaml @4.02.0_1 was updated to ocaml @4.02.1_0 unison @2.40.102_1 was updated to unison @2.40.102_2
After the update, any attempt to use unison failed while propagating updated with Uncaught exception Failure("input_value: bad bigarray kind")
.
Reactivated unison @2.40.102_1, and it still works.
After a little searching, I suspect the problem is caused by an incompatibility between the Unison source and the updated OCaml.
Tried to confirm that by reactivating ocaml @4.02.0_1 and rebuilding unison @2.40.102_2, but wasn't able to; with no variants, no building is done, with +aqua, build fails as described in ticket #40052, with +x11, build fails because dependency lablgtk2 requires that "gtk2 must be installed with +x11 and without +quartz".
Change History (16)
comment:1 Changed 10 years ago by ecronin (Eric Cronin)
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by Polyergic (Shad Sterling)
Resolution: | invalid |
---|---|
Status: | closed → reopened |
After upgrading to Yosemite, port refuses to reinstall unison @2.40.102_1, and installs unison @2.40.102_2 without as much as a warning that it's not installing the version I specified.
The remote host is running OpenSUSE, which uses binary RPMs; the latest package is unison-2.40.102-34.18.x86_64, and that update doesn't fix the problem with local unison @2.40.102_2.
Why did unison @2.40.102_1 disappear with the upgrade? How can I get it back?
comment:3 Changed 10 years ago by Polyergic (Shad Sterling)
I found a workaround, it's nowhere near as good as being able to install a compatible version by the normal process, but it seems to be working so far.
- Install OCaml 4.01 follow the directions at https://trac.macports.org/wiki/howto/InstallingOlderPort
Use portfile https://trac.macports.org/browser/trunk/dports/lang/ocaml/Portfile?rev=117887
- ( I don't think it helped, but I while trying to resolve error messages I added my username to the
admin
andwheel
groups,
- To install
./Portfile
, usermacports
must havex
permission through the entire directory tree from/
toPortfile
I used the solution from http://superuser.com/a/598834/175529 : put the Portfile in /tmp,
cd /tmp
, and do the rest from there.
- The OCaml 4.01 Portfile requires a nonexistant patch when using the default (XCode) compiler
Setting the compiler to gcc skips that patch, see compiler options at https://trac.macports.org/wiki/UsingTheRightCompiler
- To make sure I specified a compiler I already had installed I used
port installed | grep gcc
to find that onlygcc48
was installed.
The command I used to build OCaml:
port install configure.compiler=macports-gcc-4.8
- The
aqua
variant ofunison
is broken, but there are patches posted in https://trac.macports.org/ticket/40052 that might work
(I didn't try this.)
- Since
unison
is usually installed as a pre-built backage, use-s
to force local build (which will use the local OCaml 4.01); see http://stackoverflow.com/a/10669465/776723
The command I used:
port -s install unison
It sounds like the underlying bug is an upstream unison bug (other incompatible unison versions abort after handshaking with an error message, rather than waiting until you've gone through the conflict resolution and then crashing), but MacPorts issuing an incompatible pre-built updated version, removing the older compatible version, and removing the older OCaml compiler version required for a compatible build, meant I had to jump through a lot of extra hoops just to make it work. Is keeping the older versions available to install really more work than the hours of research I had to do to get it working again? ... and what is the criteria for considering a problem that breaks a users install an "invalid" report?
comment:4 Changed 10 years ago by pturing@…
The version built with ocaml 4.02 is probably not useful to many people since most remote servers will be running Linux and all the Linux distros are not on ocaml 4.02 yet. Even *Gentoo* isn't on 4.02 yet
comment:5 follow-up: 9 Changed 10 years ago by ecronin (Eric Cronin)
Cc: | mww@… added |
---|---|
Port: | ocaml added |
Version: | 2.3.2 |
If you are on Yosemite wiki:howto/InstallingOlderPort for OCaml 4.01 and then forcing unison to build from source is the only option. OCaml was already at 4.02 when Yosemite was released, so a macports version built with 4.01 has never existed.
For older OS X releases, if you want the default variants you can grab unison@2.40.102_1 from packages.macports.org and install the package. Trying to 'port install port @version' does not work, it will always install whatever the current latest version in the PortIndex is.
This has come up in the past when Unison itself is updated and various distros update at different paces causing compatibility. Nobody has volunteered to put in the effort to support more than the latest release, especially since upstream provides binaries you can download. CCing mww since this is a request for supporting multiple parallel installs of OCaml at this point.
I still think this is invalid from macports standpoint for a 'nomaintainer' port unless we add multiple OCaml ports in which case I'll add variants. It works correctly as long as both ends are built with the same OCaml release after the _2 revision.
comment:8 Changed 10 years ago by Polyergic (Shad Sterling)
With the release of unison @2.48.3_0 the situation has gotten worse. unison @2.48.3_0 itself behaves better with other version of unison, it follows the usual unison upgrade behavior of noting the version mismatch and aborting just after it connects. Reinstalling unison @2.40.102_2 to be compatible with other OSs now requires following the directions at https://trac.macports.org/wiki/howto/InstallingOlderPort , which entails downloading the old unison Portfile and 2 patches from https://trac.macports.org/browser/trunk/dports/net/unison?rev=127145 .
This time I made a script that rolls back both ocaml and unison. It works for me, the result is compatible with the latest OpenSUSE version, unison-2.40.102-34.28.x86_64.rpm . Of course, I provide no warranty: use at your own risk! http://pastebin.com/1F9AA92p
comment:9 follow-up: 10 Changed 10 years ago by geezel@…
I also went through all the exercises described in this ticket. The situation of the unison port is very unsatisfactory. As a temporary fix I created a local ports tree to compile unison 2.48.3 against ocaml 4.01, but I'd like to see this fixed in the official tree.
Replying to ecronin@…:
If you are on Yosemite wiki:howto/InstallingOlderPort for OCaml 4.01 and then forcing unison to build from source is the only option. OCaml was already at 4.02 when Yosemite was released, so a macports version built with 4.01 has never existed.
Has there been any good reason for upgrading ocaml to 4.02 that early? As pturing has already pointed out, the major Linux distros were still at 4.01 four months ago, and they still are (at least the stable branches). FreeBSD is also at 4.01.
For older OS X releases, if you want the default variants you can grab unison@2.40.102_1 from packages.macports.org and install the package. Trying to 'port install port @version' does not work, it will always install whatever the current latest version in the PortIndex is.
Why does 'port install port @version' not work? Has this been working in the past? (I'm using Macports only since a couple of months.)
This has come up in the past when Unison itself is updated and various distros update at different paces causing compatibility. Nobody has volunteered to put in the effort to support more than the latest release, especially since upstream provides binaries you can download. CCing mww since this is a request for supporting multiple parallel installs of OCaml at this point.
The binaries provided at http://alan.petitepomme.net/unison/assets/ are not exhaustive. For example, there is no OS X binary of 2.40.102, which was the version I needed when I first tried to use unison on OS X. Apparently there has been some effort in the past to address these issues: https://trac.macports.org/ticket/35639
I think this is the way to go, but it seems this never made it into the tree. Why?
I still think this is invalid from macports standpoint for a 'nomaintainer' port unless we add multiple OCaml ports in which case I'll add variants.
How would you use variants to maintain multiple versions? In the above mentioned ticket it was suggested to use "subports", but I was unable to find any documentation on subports.
It works correctly as long as both ends are built with the same OCaml release after the _2 revision.
You cannot rely on these conditions to be satisfied. Quite the opposite: in general the remote machine will *not* meet these conditions and in general the user of the client machine is not entitled to change this. (Most, if not all, Linux or FreeBSD machines out there that run *any* version of unison will be incompatible with the current MacPorts version.)
Why not just go the easy route and provide ports ocaml-401, unison-232, unison-240 etc. as it's done in FreeBSD, for example? I don't see that the older ports require a lot of maintenance.
Let me know if I can help.
comment:10 follow-up: 11 Changed 10 years ago by Polyergic (Shad Sterling)
Replying to geezel@…:
I also went through all the exercises described in this ticket. The situation of the unison port is very unsatisfactory. As a temporary fix I created a local ports tree to compile unison 2.48.3 against ocaml 4.01, but I'd like to see this fixed in the official tree.
Did my script from comment 8 not work for you? I hoped it would be easier than creating a local ports tree, I may want to improve it if it's not. http://pastebin.com/1F9AA92p
comment:11 Changed 10 years ago by geezel@…
Replying to me@…:
Replying to geezel@…:
I also went through all the exercises described in this ticket. The situation of the unison port is very unsatisfactory. As a temporary fix I created a local ports tree to compile unison 2.48.3 against ocaml 4.01, but I'd like to see this fixed in the official tree.
Did my script from comment 8 not work for you? I hoped it would be easier than creating a local ports tree, I may want to improve it if it's not. http://pastebin.com/1F9AA92p
I have to correct myself: I went through *most* of the exercises described in this ticket. In fact I did my attempts to compile various unison versions around the same time as you. I remember that your comment 8 appeared on this thread only a few days after I had everything in place on my machine, including a local ports tree, so there was and is currently no need for me to try your script. But thanks anyway :-)
When I went through all this I also ran into another issue, see here: ticket:47374. Of course I initially thought this was another side effect of the known ocaml issues. But after several unsuccesful attempts to get unison 2.40.102 up and running, I went for 2.48.3. I was just lucky that an upgrade of my NAS4free box included an upgrade to unison 2.48.3. (You cannot easily upgrade individual packages on the NAS4free embedded install.)
So, currently all my machines are on version 2.48.3, which still exhibits the freezes described in ticket:47374.
My comment 9 was just to emphasize once again that this should be fixed in the tree. Of course workarounds are nice to have, but it gets tedious as soon as you have to apply these on more than 2 machines.
comment:12 Changed 10 years ago by Polyergic (Shad Sterling)
Looks like OpenSUSE updated to Unison 2.48 without updating to OCaml 4.02. Trying to sync between macports unison @2.48.3_0 and OpenSUSE unison-2.48.3-35.9.x86_64 fails with Unison failed: Uncaught exception Failure("input_value: bad bigarray kind")
comment:13 Changed 10 years ago by Polyergic (Shad Sterling)
Tried to update my script to recompile 2.48 using ocaml 4.01, and I'm getting checksum errors. From the log:
:debug:checksum checksum phase started at Thu Apr 16 19:50:56 EDT 2015 :notice:checksum ---> Verifying checksums for unison :debug:checksum Executing org.macports.checksum (unison) :info:checksum ---> Checksumming unison-2.48.3.tar.gz :debug:checksum Calculated (rmd160) is f70cca489bbde21797429a7c687e6ac86299ae79 :error:checksum Checksum (rmd160) mismatch for unison-2.48.3.tar.gz :info:checksum Portfile checksum: unison-2.48.3.tar.gz rmd160 884b4ec225d0411e8112e809c621b6779cf816b6 :info:checksum Distfile checksum: unison-2.48.3.tar.gz rmd160 f70cca489bbde21797429a7c687e6ac86299ae79 :debug:checksum Calculated (sha256) is f40d3cfbe82078d79328b51acab3e5179f844135260c2f4710525b9b45b15483 :error:checksum Checksum (sha256) mismatch for unison-2.48.3.tar.gz :info:checksum Portfile checksum: unison-2.48.3.tar.gz sha256 a695f9d45e95d3d9c3f25fcbf1891f5eb20e5aa51709f81b785a20e14270b7ee :info:checksum Distfile checksum: unison-2.48.3.tar.gz sha256 f40d3cfbe82078d79328b51acab3e5179f844135260c2f4710525b9b45b15483 :info:checksum The correct checksum line may be: :info:checksum checksums rmd160 f70cca489bbde21797429a7c687e6ac86299ae79 \ sha256 f40d3cfbe82078d79328b51acab3e5179f844135260c2f4710525b9b45b15483 :error:checksum org.macports.checksum for port unison returned: Unable to verify file checksums
The quick way to reproduce that is:
mkdir -p /tmp/unison-2.48.3_0/files; pushd /tmp/unison-2.48.3_0; wget https://trac.macports.org/export/135156/trunk/dports/net/unison/Portfile; wget https://trac.macports.org/export/135156/trunk/dports/net/unison/files/patch-Makefile.diff; mv patch-Makefile.diff files; chmod a+rx . Portfile files; sudo port -s install; popd; rm -r /tmp/unison-2.48.3_0
What's going on here?
comment:14 Changed 10 years ago by Polyergic (Shad Sterling)
Trying to roll back to unison @2.40.102_2 using http://pastebin.com/1F9AA92p also fails with checksum errors.
comment:15 Changed 10 years ago by Polyergic (Shad Sterling)
I don't know that it's safe to do this, but just substituting the checksums is enough to get unison @2.48.3_0 to install, and it appears to be compatible with OpenSUSE unison-2.48.3-35.9. The script for this is http://pastebin.com/RetMEj4C
Doing the same for unison @2.40.102_2 gets past the checksum errors, but then fails applying patches with 3 of the error "Reversed (or previously applied) patch detected!
"
comment:16 Changed 6 years ago by pmetzger (Perry E. Metzger)
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
The current version of Unison is 2.51.2, and the current version of OCaml in MacPorts is years newer than 4.02.1. I'm calling this dead.
This is an incompatibility between Unison built with OCaml 4.02 and Unison built with OCaml < 4.02 due to changes in object serialization made in OCaml 4.02. If client and server are both built with OCaml 4.02 there is no exception, similarly if client/server are both built with OCaml < 4.02 there is no exception. There isn't really anything Macports can do here, we only want to support one (the most recent stable) OCaml release.
If you can't update the remote host to use the same version of OCaml as macports now uses (and build Unison against that) you can re-activate/manually install the older OCaml and force re-build Unison from source.
Because OCaml is only a build dependency for Unison and OCaml 4.02 came after Unison @2.40.102_1, most users did not encounter this until re-installing everything for Yosemite. Unfortunately there *was* a run-time segfault incompatibility with Unison @2.40.102_1 and OCaml 4.02 so I had to revbump the port when fixing it. If you had a working unison @2.40.102_1 it's safe to re-activate it (or if you're pre-Yosemite grab it from the pre-built packages since it was built with the older OCaml).