Bug 173364 - lang/ocaml Update to 4.00.1
Summary: lang/ocaml Update to 4.00.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Brendan Fabeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-04 18:30 UTC by Michaël Grünewald
Modified: 2014-03-26 17:58 UTC (History)
0 users

See Also:


Attachments
file.diff (55.31 KB, patch)
2012-11-04 18:30 UTC, Michaël Grünewald
no flags Details | Diff
patch-ocaml.txt (28.88 KB, patch)
2013-02-14 22:23 UTC, Michaël Grünewald
no flags Details | Diff
patch-ocaml.txt (29.11 KB, patch)
2013-04-16 22:24 UTC, Michaël Grünewald
no flags Details | Diff
patch-ocaml.txt (29.32 KB, patch)
2013-06-20 07:27 UTC, Michaël Grünewald
no flags Details | Diff
patch-ocaml.text (33.83 KB, text/plain; charset=us-ascii)
2013-10-12 15:52 UTC, Michael Grünewald
no flags Details
ocaml4010_diff.txt (32.24 KB, text/plain; charset=US-ASCII)
2013-11-21 10:24 UTC, bf
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michaël Grünewald 2012-11-04 18:30:00 UTC
- Update to ocaml-4.00.1.
- Install documentation and obsoletes ocaml-doc-3.12 (closes PR/165416).
- Comply with NOPORTDOCS.
- Supersedes the PR on the some topic I sent a few days ago
  (number still unknown, I am sorry for the noise!)

All ports depending on lang/ocaml may need to be recompiled. The last /usr/ports/UPDATING entry used could be used again (up to the date of course)!

20110406:
  AFFECTS: users of lang/ocaml and related libraries/applications
  AUTHOR: stas@FreeBSD.org

  Ocaml compiler and libraries suite has been updated to 3.12.
  There appears to be an ABI incompatibility with .cmi files
  generated by previous compiler versions.  Though these should
  only affect the linking process, if some application you're
  using start to misbehave after the lang/ocaml updated you're
  advised to rebuild this applications using the new ocaml version.

Fix: Patch attached with submission follows:
Comment 1 Brendan Fabeny freebsd_committer freebsd_triage 2013-01-04 22:45:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bf

I'll take it.
Comment 2 John Marino 2013-01-26 16:06:57 UTC
Unless I'm missing something, this patch does not apply cleanly (not 
even close).

some issues:
does not exist: ocaml/files/man1
does not exist: ocaml/files/mann
does not exist: ocaml/files/manlinks
already exists: ocaml/files/manfiles
doesn't apply: pkg-plist

I don't think I'm doing anything wrong.
The PR/173364 was submitted Nov 4, 2012
The last commit to this lang/ocaml (excluding files/patch-configure) was 
11 months ago.

It doesn't appear this patch is a victim of bitrot, so what happened here?

(I'm not a FreeBSD ports committer, I was curious if this PR worked).

John
Comment 3 b. f. 2013-01-27 00:47:20 UTC
On 1/26/13, John Marino <freebsdml@marino.st> wrote:
> The following reply was made to PR ports/173364; it has been noted by
> GNATS.
>
> From: John Marino <freebsdml@marino.st>
> To: bug-followup@FreeBSD.org, michael.grunewald@laposte.net
> Cc:
> Subject: Re: ports/173364: lang/ocaml Update to 4.00.1
> Date: Sat, 26 Jan 2013 17:06:57 +0100
>
>  Unless I'm missing something, this patch does not apply cleanly (not
>  even close).
>
>  some issues:
>  does not exist: ocaml/files/man1
>  does not exist: ocaml/files/mann
>  does not exist: ocaml/files/manlinks
>  already exists: ocaml/files/manfiles
>  doesn't apply: pkg-plist
>
>  I don't think I'm doing anything wrong.
>  The PR/173364 was submitted Nov 4, 2012
>  The last commit to this lang/ocaml (excluding files/patch-configure) was
>  11 months ago.
>
>  It doesn't appear this patch is a victim of bitrot, so what happened here?

They appear to be artifacts of the method used to generate the patch.
However, it should not be hard to make the necessary adjustments.  I
have not applied the patch yet as there are some pending updates that
will go in first, to the tcl/tk ports and to ocaml-lablgtk2.

>
>  (I'm not a FreeBSD ports committer,

It doesn't matter.

> I was curious if this PR worked).

I have yet to test it, but the maintainer has a good record.

b.
Comment 4 John Marino 2013-01-27 11:27:51 UTC
On 1/27/2013 01:47, b.f. wrote:
> On 1/26/13, John Marino<freebsdml@marino.st>  wrote:
>>   It doesn't appear this patch is a victim of bitrot, so what happened here?
> They appear to be artifacts of the method used to generate the patch.
> However, it should not be hard to make the necessary adjustments.  I
> have not applied the patch yet as there are some pending updates that
> will go in first, to the tcl/tk ports and to ocaml-lablgtk2.
>> I was curious if this PR worked).
> I have yet to test it, but the maintainer has a good record.

Okay, I'll leave it for you to test, but I remain skeptical it's a 
simple patch generation issue.  Many of the patches applied, so it's not 
a "reverse patch" issue.  It really appears that the patch was generated 
against a different version of the ocaml port.

Thanks, I'll keep watching this PR.

John
Comment 5 Michaël Grünewald 2013-01-29 20:36:36 UTC
Hi John,

thank you very much for your comments, I will try to fix things ASAP,
probably Sat or Sun.

John Marino wrote:
> Unless I'm missing something, this patch does not apply cleanly (not
> even close).
> 
> some issues:
> does not exist: ocaml/files/man1
> does not exist: ocaml/files/mann
> does not exist: ocaml/files/manlinks
> already exists: ocaml/files/manfiles
> doesn't apply: pkg-plist
> 
> I don't think I'm doing anything wrong.
> The PR/173364 was submitted Nov 4, 2012
> The last commit to this lang/ocaml (excluding files/patch-configure) was
> 11 months ago.
> 
> It doesn't appear this patch is a victim of bitrot, so what happened here?

Well I am unsure could you sent me the command you used to apply the
patch?  It looks pretty bad anyway!

> (I'm not a FreeBSD ports committer, I was curious if this PR worked).

If you need to use OCaml 4 before the update made it through, I could
send you a tarball with a working port  like what you got from
freshports.org  just let me know.

Best regards,
Michael
Comment 6 John Marino 2013-01-29 21:14:19 UTC
On 1/29/2013 21:36, Michael Grünewald wrote:
> Well I am unsure could you sent me the command you used to apply the
> patch?  It looks pretty bad anyway!

it was something along the lines of "patch -p 2 --check < patch.txt" 
from within the lang/ocaml directory.  Like I said, much of the files 
patches ok so the command itself was fine.  The patch was just expecting 
a different starting state than the ports have.

>
> If you need to use OCaml 4 before the update made it through, I could
> send you a tarball with a working port  like what you got from
> freshports.org  just let me know.
>

I can wait, thanks!
John
Comment 7 Michaël Grünewald 2013-02-14 22:23:24 UTC
Since John Marino had trouble with my previous patch, I am providing a
new one.  It was generated against commit 312241 in our ports tree.
Comment 8 Stanislav Sedov freebsd_committer freebsd_triage 2013-04-15 21:32:41 UTC
Hi!

There're appears to be some style bugs in the last patch
you submitted.  In particular, you used spaces to indent
instead of tabs in numerous places, which can be spotted
in the diff itself.  Can you, please, run the changes through
the portlint and fix those issues?

Thanks!

-- 
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
Comment 9 Michaël Grünewald 2013-04-16 22:24:12 UTC
Hi Stanislas,

thank you for message,

Stanislav Sedov wrote:
> There're appears to be some style bugs in the last patch
> you submitted.  In particular, you used spaces to indent
> instead of tabs in numerous places, which can be spotted
> in the diff itself.  Can you, please, run the changes through
> the portlint and fix those issues?

indeed the patch I submitted was susceptible of improvement :)

There is still a warning emitted, caused by the voodoo used to guess
documentation file names.

Regards,
Michael
Comment 10 Stanislav Sedov freebsd_committer freebsd_triage 2013-04-25 22:46:16 UTC
On Tue, 16 Apr 2013 23:24:12 +0200
Michael Gr__newald <michael.grunewald@laposte.net> mentioned:

> Hi Stanislas,
> 
> thank you for message,
> 
> Stanislav Sedov wrote:
> > There're appears to be some style bugs in the last patch
> > you submitted.  In particular, you used spaces to indent
> > instead of tabs in numerous places, which can be spotted
> > in the diff itself.  Can you, please, run the changes through
> > the portlint and fix those issues?
> 
> indeed the patch I submitted was susceptible of improvement___ :)
> 
> There is still a warning emitted, caused by the voodoo used to guess
> documentation file names.
> 
> Regards,
> Michael
> 
> 
> 
> !DSPAM:516dc18d13142032312706!

Hi!

Sorry for delay, and thanks for the work.
It looks like you might have send a wrong patch, though.
This one still contains a lot of spaces instead of tabs
in some places, e.g. in the PORTVERSION line.

This is a result of a quick run of portlint here:

WARN: /storage0/home/stas/ocaml/pkg-plist: [803]: installing shared libraries, please define USE_LDCONFIG as appropriate
FATAL: Makefile: [9]: use a tab (not space) after a variable name
FATAL: Makefile: [13]: use a tab (not space) after a variable name
FATAL: Makefile: [16]: use a tab (not space) after a variable name
FATAL: Makefile: [22]: use a tab (not space) after a variable name
WARN: Makefile: [23]: use a tab (not space) after a variable name
FATAL: Makefile: [51]: use a tab (not space) after a variable name
WARN: Makefile: [139]: use ${VARIABLE}, instead of $(VARIABLE).
WARN: Makefile: [163]: possible direct use of command "install" found. use ${INSTALL_foobaa} instead.
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
WARN: Makefile: use of DISTFILES with single file discouraged. distribution filename should be set by DISTNAME and EXTRACT_SUFX.
WARN: Makefile: DISTFILES/DISTNAME affects WRKSRC. take caution when changing them.
5 fatal errors and 7 warnings found.

Besides spaces/tabs the DISTFILES line is likely redundant, the value it is set to is
the default value.

Regarding the patch itself:

> +# Do we want to install documentation
> +.if !defined(NOPORTDOCS)
> +
> +.endif

What is this for?

> -# Add compiler's libs if required
> -.if defined(WITH_CMP_LIB)
> -       @${MKDIR}  ${PREFIX}/lib/ocaml/compiler-lib
> -       @${INSTALL_DATA} ${WRKSRC}/utils/*.cm* ${PREFIX}/lib/ocaml/compiler-lib
> -       @${INSTALL_DATA} ${WRKSRC}/utils/*.o ${PREFIX}/lib/ocaml/compiler-lib
> -       @${INSTALL_DATA} ${WRKSRC}/parsing/*.cm* ${PREFIX}/lib/ocaml/compiler-lib
> -       @${INSTALL_DATA} ${WRKSRC}/parsing/*.o ${PREFIX}/lib/ocaml/compiler-lib
> -       @${INSTALL_DATA} ${WRKSRC}/typing/*.cm* ${PREFIX}/lib/ocaml/compiler-lib
> -       @${INSTALL_DATA} ${WRKSRC}/typing/*.o ${PREFIX}/lib/ocaml/compiler-lib
> -       @${FIND} ${PREFIX}/lib/ocaml/compiler-lib -type f | \
> -               ${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
> -       @${ECHO_CMD} "@dirrm lib/ocaml/compiler-lib" >> ${TMPPLIST}
> -.endif

Why we are not installing compiler libraries anymore?

> +.if !defined(NOPORTDOCS)
> +       ${MKDIR} ${DOCSDIR}
> +       (cd ${WRKDIR} && ${COPYTREE_SHARE} htmlman ${DOCSDIR})
> +       ${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.ps.gz ${DOCSDIR}

It makes sense to gunzip the PS file first.  Or maybe not install it at all
as you're installing the PDF file as well with the same contents.

> +       ${INSTALL_DATA} ${_DISTDIR}${DOCSDISTNAME}-refman.pdf ${DOCSDIR}
> +.endif

> -MAINTAINER?=   michael.grunewald@laposte.net
> -COMMENT?=      The Objective Caml compiler and programming environment
> +MAINTAINER=    michipili@gmail.com
> +COMMENT=       The Objective Caml compiler and programming environment

This variables may be overridden in slave ports.  That's why they conditional.
Why did you change them?

> --- /dev/null
> +++ b/ocaml/files/edit_pkg-plist.sed
> @@ -0,0 +1,6 @@
> +/.p.cmx$/s@^@%%PROF%%@
> +/examples_labeltk/{
> +  s@share/examples@%%EXAMPLESDIR%%@
> +  s@^@%%TK%%@
> +}
> +/graphics/s@^@%%X11%%@

What is the purpose of this file?

Otherise, the patch is looking really good.
Can you, please, take a look at these issues?

Thanks for the work!


-- 
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments
Comment 11 Stanislav Sedov freebsd_committer freebsd_triage 2013-04-25 22:55:47 UTC
On Tue, 16 Apr 2013 23:24:12 +0200
Michael Gr=C3=BCnewald <michael.grunewald@laposte.net> mentioned:

> Hi Stanislas,
>=20
> thank you for message,
>=20
> Stanislav Sedov wrote:
> > There're appears to be some style bugs in the last patch
> > you submitted.  In particular, you used spaces to indent
> > instead of tabs in numerous places, which can be spotted
> > in the diff itself.  Can you, please, run the changes through
> > the portlint and fix those issues?
>=20
> indeed the patch I submitted was susceptible of improvement=E2=80=A6 :)
>=20
> There is still a warning emitted, caused by the voodoo used to guess
> documentation file names.
>=20

As a quick followup it also appears that the pkg-plist is not complete.
It does not delete the doc/ocaml/htmlman directory on deinstall.

--=20
Stanislav Sedov
ST4096-RIPE

()  ascii ribbon campaign - against html e-mail=20
/\  www.asciiribbon.org   - against proprietary attachments
Comment 12 crossd 2013-05-27 19:47:57 UTC
Hi, a gentle ping on this....  I'd love to see ocaml 4.00.1 in the FreeBSD
ports collection.
Comment 13 Michaël Grünewald 2013-05-29 18:00:14 UTC
Dan Cross wrote:
> Hi, a gentle ping on this....  I'd love to see ocaml 4.00.1 in the
> FreeBSD ports collection.

Hi Dan, thank you for your interest⦠I hope, I can find time to handle
this by the end of the week!
Comment 14 Michaël Grünewald 2013-06-20 07:27:04 UTC
Hi!

Sorry about the long time-out⦠I hope my new patch is somehow cleanâ¦

> As a quick followup it also appears that the pkg-plist is not
complete.> It does not delete the doc/ocaml/htmlman directory on deinstall.

I still have a little issue: the ports uses the PORTDOCS variable which
seems to require the DOCDIR to be @dirrm'ed at deinstallation.  But many
other ports put documentation in DOCDIR so, it should be @dirrmtry'ed
instead:

===>   Deinstalling ocaml-4.00.1
pkg_delete: unable to completely remove directory
'/usr/local/share/doc/ocaml'
pkg_delete: couldn't entirely delete package `ocaml-4.00.1'
(perhaps the packing list is incorrectly specified?)


Do you have any clue on dealing with this?  Maybe we can move the
documentation in a subdir of share/doc/ocaml, like
share/doc/ocaml/ocaml-4.00-refman-html.  Or do you have any better idea?

Cheers!
Michael

~~~~~~~~
Entry for UPDATING:

AFFECTS: users of lang/ocaml and related libraries/applications
AUTHOR: stas@FreeBSD.org

Ocaml compiler and libraries suite has been updated to 4.00.1.
There appears to be an ABI incompatibility with .cmi files
generated by previous compiler versions. Though these should
only affect the linking process, if some application you're
using start to misbehave after the lang/ocaml updated you're
advised to rebuild this applications using the new ocaml version.
~~~~~~~~
Comment 15 bf 2013-08-18 09:49:37 UTC
Michael:

I will begin test builds soon with your patch.  Do you have any
further comments or changes to add before I do?  I'm going to switch
the NOPORTDOCS conditionals to checking the default option DOCS,
because NOPORTDOCS Is deprecated.  The problem with the shared
documents directory is a minor issue, and one that exists with a
number of other ports that share directories.  Perhaps the dirrms in
default add-plist-* targets should be changed to dirrmtrys, but at the
moment, we don't need to worry about this unless some of these other
ports that use the ocaml DOCSDIR do not depend on ocaml.

b.
Comment 16 Michaël Grünewald 2013-08-24 10:33:46 UTC
Brendan Fabeny wrote:
> Michael:
> 
> I will begin test builds soon with your patch.  Do you have any
> further comments or changes to add before I do?  I'm going to switch
> the NOPORTDOCS conditionals to checking the default option DOCS,
> because NOPORTDOCS Is deprecated.  The problem with the shared
> documents directory is a minor issue, and one that exists with a
> number of other ports that share directories.  Perhaps the dirrms in
> default add-plist-* targets should be changed to dirrmtrys, but at the
> moment, we don't need to worry about this unless some of these other
> ports that use the ocaml DOCSDIR do not depend on ocaml.

Hi, thank you for your message!

Besides the dirrmtry issue there is another minor one: elisp macros for
the ocaml debugger are not installed.  (Some users will prefer Tuareg.)

I hope I can find time tomorrow to give a look at it!  Have already a
time horizon for your test builds?

Best regards,
Michael
Comment 17 Michael Grünewald 2013-10-12 15:52:17 UTC
Meanwhile is ocaml-4.01.0 already out!  Here is my patch for this new
release.

As a side note, I decided to put the ports I maintain on bitbucket, see

   git@bitbucket.org:michipili/ports-bsd.git

The repository has a vendor branch tracking the contents of the ports
tree, and an ocaml branch holding my candidate for the next ocaml port. 
I produced the diff with

  git diff vendor ocaml

There is a small issue with this latest OCaml release: support for bdb
was dropped and the library now lives as a separate package. As far as I
know, it is not ported to FreeBSD but it might be available through opam.
-- 
Regards,
Michael
Comment 18 bf 2013-11-21 10:24:51 UTC
Michael:

I've finished the pre-change builds ( Unfortunately, the ports tree is
a bit messy at the moment, with all the  changes that have been taking
place, leaving quite a few ports with broken plists, etc. And a number
of the ocaml* ports are not really safe for parallel builds ...)  But
after some patches, only lang/opa (failure after www/node update) and
www/ocsigen ( build problems) are broken on {8.3,9.1}-{i386,amd64},
out of the ~90 ports that depend upon ocaml by default.  Now I'm doing
the post-change builds (I should have preliminary results by the end
of today), using the attached patch for lang/ocaml.  It's a slightly
modified version of your last patch in the audit trail for this PR,
incorporating the new options changes, and a few other minor
clean-ups.  If I've overlooked some important later changes in your
private repository, please let me know as soon as possible.  One thing
we may have to change before or shortly after the update is the use of
the package suffixes nox11 and notk -- portmgr has asked us to stop
adding suffixes based on options, since pkgng stores the options with
the package, and we will soon be moving to pkgng, even on older
supported versions of FreeBSD. We should also probably remove the
confusing redefinition of ARCH on powerpc*, at least in the port
Makefile, perhaps by using an alias like on sparc64, when we can test
such a change.  (Incidentally, I'll ask another user to test this on
sparc64.)

Regards,
b.
Comment 19 bf 2013-11-21 17:02:27 UTC
An updated version of the ocaml update, including further fixes for
lang/ocaml itself, and patches to related ports to fix build failures,
is at:

http://people.freebsd.org/~bf/ocaml4.diff.xz

Some preliminary results of the run on 9.1-amd64:

http://people.freebsd.org/~bf/ocaml4_errorlogs.tar.xz

Ports broken before the update:
lang/opa -- UPDATE
www/ocsigen -- UPDATE

Ports broken after the update, followed by the method I intend to use
to fix the problem:
leaf ports, lower priority:
astro/planets -- PATCH
audio/liquidsoap -- UPDATE
databases/ocaml-pgocaml -- UPDATE
databases/ocaml-sqlite3 -- UPDATE
devel/frama-c  -- UPDATE
devel/ocaml-pomap -- UPDATE
devel/omake -- PATCH
lang/opa -- UPDATE
security/sks -- PATCH
textproc/htmlc -- UPDATE
textproc/ocaml-text -- UPDATE

trunk ports (and masked ports that depend upon them), higher priority:
devel/ocaml-camlp5(math/coq,sysutils/ledit,www/geneweb) -- UPDATE
math/facile(science/kalzium) -- PATCH
www/ocaml-net(lang/cduce,textproc/ocaml-pxp,textproc/ocaml-tyxml,www/ocsigen)
-- UPDATE

I'll try to fix some of these ports, beginning with ocaml-camlp5 and
ocaml-net.  When we've dealt with the build failures that can be
addressed relatively easily, and in a short amount of time, I'll mark
the remaining failures as BROKEN and alert maintainers, and proceed
with the update.

b.
Comment 20 Michael Grünewald 2013-11-21 22:20:50 UTC
Hi Brendan,

thank you for your feedback and your work!  I will look at these things
more closely this weekend and will let you know how things went out for me.

Regards,
Michael
Comment 21 martin 2014-02-26 12:59:05 UTC
May I inquire to the status of this PR? And offer my help if any is
required to get this commited?
Comment 22 Michael Grünewald 2014-02-26 17:34:49 UTC
Hi Brendan,

what is the state of ocaml-camlp5 or ocaml-net? How could we (Martin and
myself) help to test these or to fix other packages  those listed in
your follow-up?


Best regards,
Michael
Comment 23 bf 2014-02-28 02:06:38 UTC
On 2/26/14, Michael <michipili@gmail.com> wrote:
> The following reply was made to PR ports/173364; it has been noted by
> GNATS.
>
> From: Michael <michipili@gmail.com>
> To: bug-followup@FreeBSD.org, michael.grunewald@laposte.net
> Cc:
> Subject: Re: ports/173364: lang/ocaml Update to 4.00.1
> Date: Wed, 26 Feb 2014 18:34:49 +0100
>
>  Hi Brendan,
>
>  what is the state of ocaml-camlp5 or ocaml-net? How could we (Martin and
>  myself) help to test these or to fix other packages -- those listed in
>  your follow-up?

I'll try to update the blockers and commit the update this weekend.
If I encounter significant problems I'll contact the two of you and we
can make a concerted effort to fix them.

Regards,
           b.
Comment 24 Antoine Brodin freebsd_committer freebsd_triage 2014-03-26 09:05:04 UTC
Hi,

Any plan to commit this update soon?
The ocaml ports are going to be marked deprecated on April 1st because
they are not staged.
I have preliminary stage patches to stage some of them but I don't
want to work on staging ocaml 3 if it's replaced by ocaml4 after.

Cheers,

Antoine (with hat: portmgr)
Comment 25 John Marino freebsd_committer freebsd_triage 2014-03-26 17:58:22 UTC
State Changed
From-To: open->closed

Ocaml 4.00.1 committed, switching to 4.0.1 PR (173453)