Bug 199884 - [PATCH] lang/ocaml: fix build when CONFIGURE_ARGS contains =
Summary: [PATCH] lang/ocaml: fix build when CONFIGURE_ARGS contains =
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
Keywords: patch
: 199878 (view as bug list)
Depends on:
Reported: 2015-05-03 11:44 UTC by Po-Chuan Hsieh
Modified: 2015-05-03 13:37 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (michipili)

ocaml diff (725 bytes, patch)
2015-05-03 11:44 UTC, Po-Chuan Hsieh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Po-Chuan Hsieh freebsd_committer 2015-05-03 11:44:47 UTC
Created attachment 156272 [details]
ocaml diff

- Remove unnecessary check for configure arguments

While upgrading lang/ocaml to latest 4.02.1, I got the following failure while upgrading this port:

===>  Configuring for ocaml-nox11-4.02.1
[ERROR!]Arguments to this script look like '-prefix /foo/bar', not '-prefix=/foo/bar' (note the '=').
===>  Script "configure" failed unexpectedly. 

It was caused by "CPUTYPE?=core2" in /etc/make.conf
With this setting, $configure_options in configure was set to
  -verbose -prefix /usr/local -cc "clang -O2 -pipe -march=core2  -fno-strict-aliasing" -as "as " -aspp clang -c -partialld ld -r -as as  -no-graph

Then it fails to configure.

The check in configure line 88 to 90 is incomplete as it does not consider quotes.
Comment 1 Guido Falsi freebsd_committer 2015-05-03 12:16:11 UTC
*** Bug 199878 has been marked as a duplicate of this bug. ***
Comment 2 Guido Falsi freebsd_committer 2015-05-03 12:16:57 UTC
I filed a similar bug earlier, I marked it as duplicate of this one. The patch there is equivalent to the one here.
Comment 3 Michael Grünewald 2015-05-03 12:40:27 UTC
Hmm, that's strange, this seems like a bug a reported upstream a long time ago:


Maybe you can ask to reopen the issue?
Comment 4 Guido Falsi freebsd_committer 2015-05-03 13:00:15 UTC
(In reply to Michael Grünewald from comment #3)

reporting fixes upstream is maintainer's responsibility:


Anyway, reopening the bug upstream will not solve the problem which is present in the ports tree, so first some action is required in the ports tree to solve this.

You can approve the submitted patch or submit a better one if you have one.

After that you should contact the upstream and propose a fix there. You can ask help n this part, but you have to be aware that it's one of the maintainer's duties.
Comment 5 Michael Grünewald 2015-05-03 13:16:24 UTC
The patch is fine, we used to have something similar but it was removed as the
upstream bug has been closed.

Upstream bug http://caml.inria.fr/mantis/view.php?id=6628 is precisely me reporting
the bug upstream and asking to have this “argument validation” fixed, with a patch
pretty similar to what you propose.  They want to keep a form of validation, so
you (Guido, sunpoet) will have to detail your use-case there.
Comment 6 Guido Falsi freebsd_committer 2015-05-03 13:20:42 UTC
(In reply to Michael Grünewald from comment #5)

Sorry, I clearly did not check your link properly.

I will followup to it.
Comment 7 Michael Grünewald 2015-05-03 13:23:18 UTC
> Sorry, I clearly did not check your link properly.

No problem!
Comment 8 Matthew Rezny freebsd_committer 2015-05-03 13:27:14 UTC
I have the same problem and I also have set CPUTYPE in make.conf. That did not pose a problem with the prior version of the port, so I first suspected a change in the port iteself (many patches were dropped). Notice that the upstream bug "reported a long time ago" is reported against the version which was just put in ports, 4.02.1, so maybe the problem was first introduced upstream at this version. Anyway, there is no point in re-opening the upstream bug unless the patch doesn't work. I have tested the patch from upstream, same as sunpoet attached. It fixes the build for me.
Comment 9 commit-hook freebsd_committer 2015-05-03 13:36:10 UTC
A commit references this bug:

Author: sunpoet
Date: Sun May  3 13:35:35 UTC 2015
New revision: 385271
URL: https://svnweb.freebsd.org/changeset/ports/385271

  - Remove incomplete check for configure arguments to fix build when CONFIGURE_ARGS contains =

  PR:		199884
  Submitted by:	sunpoet (myself)
  Approved by:	Michael Grunewald <michipili@gmail.com> (maintainer)

Comment 10 Po-Chuan Hsieh freebsd_committer 2015-05-03 13:37:01 UTC
Committed. Thanks!