Bug 197127 - [mips] lang/ocaml has no local asm code for mips
Summary: [mips] lang/ocaml has no local asm code for mips
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: mips Any
: --- Affects Some People
Assignee: Michael Grünewald
URL: http://dirty.ysv.freebsd.org/data/11m...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-27 17:12 UTC by Sean Bruno
Modified: 2015-05-29 14:00 UTC (History)
5 users (show)

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


Attachments
Mark the port broken under mips (687 bytes, patch)
2015-05-23 10:36 UTC, Michael Grünewald
no flags Details | Diff
Mark the port broken under mips (656 bytes, patch)
2015-05-23 10:53 UTC, Michael Grünewald
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer 2015-01-27 17:12:49 UTC
lang/ocaml should be restricted to broken on mips due to the lack of mips ASM for now.

/nxb-bin/usr/bin/cc -O -pipe -G0  -fno-strict-aliasing -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_mips -DSYS_unknown  -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -O -pipe -G0  -fno-strict-aliasing    -c -o meta.o meta.c
ln -s ../byterun/dynlink.c dynlink.c
/nxb-bin/usr/bin/cc -O -pipe -G0  -fno-strict-aliasing -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_mips -DSYS_unknown  -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -O -pipe -G0  -fno-strict-aliasing    -c -o dynlink.o dynlink.c
gmake[4]: *** No rule to make target 'mips.o', needed by 'libasmrun.a'.  Stop.
gmake[4]: Leaving directory '/wrkdirs/usr/ports/lang/ocaml/work/ocaml-4.01.0/asmrun'
Makefile:621: recipe for target 'makeruntimeopt' failed
gmake[3]: *** [makeruntimeopt] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/lang/ocaml/work/ocaml-4.01.0'
Makefile:240: recipe for target 'opt-core' failed
gmake[2]: *** [opt-core] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/lang/ocaml/work/ocaml-4.01.0'
Makefile:129: recipe for target 'world.opt' failed
gmake[1]: *** [world.opt] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/ocaml/work/ocaml-4.01.0'
*** Error code 1
Comment 1 Bugzilla Automation freebsd_committer 2015-01-27 17:12:49 UTC
Maintainer CC'd
Comment 2 Michael Grünewald 2015-01-29 09:58:37 UTC
I am working on ocaml-4.02 [1] and will restrict the architecture for this version.  If you think mips ASM could have been added, you can try the new port — that port seems to work correctly but I need more work to port labltk, which is now an independant package.


  [1]: See Bug 195736
Comment 3 John Marino freebsd_committer 2015-05-17 15:32:09 UTC
Michael, I don't think you actually restricted the architecture in the end.  Did you want to submit a patch to do that?
Comment 4 Michael Grünewald 2015-05-19 05:20:09 UTC
I totally forgot about this. John, Could you assign the ticket to me
so that I can see it in my bugs list?  Thanks!
Comment 5 Michael Grünewald 2015-05-23 10:36:35 UTC
Created attachment 157074 [details]
Mark the port broken under mips

This is a simple patch to mark the port broken on mips.

Is the hardware actually reported as "mips" by uname -m ?
I could not find a list of possible value for this and
the best I could achieve was to verify there is a mips
directory in /usr/src/sys.
Comment 6 John Marino freebsd_committer 2015-05-23 10:46:10 UTC
I think this would be better:

BROKEN_mips=	fails to build due to the lack of ASM code for ${OCAML_ARCH}


(assuming "mips" is the value of ${ARCH})
Comment 7 Michael Grünewald 2015-05-23 10:53:11 UTC
Created attachment 157075 [details]
Mark the port broken under mips

Here is a new version!
Comment 8 John Marino freebsd_committer 2015-05-23 11:04:31 UTC
mips is very uncommon in ports.  I've found two references to ARCH: mips and mips64.

is mips even a supported arch?

Which do we need to break?  mips?  mips64?  both of them?

Maybe "mips" is wrong in all cases and it's only "mips64" ?
Comment 9 John Marino freebsd_committer 2015-05-23 11:04:54 UTC
personally I think this PR is stuck until Bruno clears this up.
Comment 10 Michael Grünewald 2015-05-23 11:08:38 UTC
Yes, let's wait for his feedback. I was not able to clear this up either.
Comment 11 John Marino freebsd_committer 2015-05-23 11:23:25 UTC
according to this document, mips is "Tier 3" support (experiment):
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/archs.html

That's why it is not listed here:
https://www.freebsd.org/where.html
Comment 12 Warner Losh freebsd_committer 2015-05-23 17:38:06 UTC
You can still have bugs in tier 3 stuff in the database. Support in ports is allowed. Besides, the document you cited is a bit dated and in need of a rewrite. mips is almost tier 2 these days, and the push in the ports tree Sean is doing is part of that effort.

The problem is simply that ocaml doesn't have the right assembler goo. Until it does, we'll need to mark it as broken.

And "which mips" doesn't matter.  they are all broken since the assembler goo that's needed is completely absent.
Comment 13 Michael Grünewald 2015-05-24 10:13:31 UTC
Hi Warner, thank you for your feedback!  As you noticed from the thread,
I am not familiar with mips but as far as I understand, the line — and
therefore the attached patch —

  BROKEN_mips=	fails to build due to the lack of ASM code for ${OCAML_ARCH}

looks fine, right?  Maybe you could give a short confirmation that
this would appropriately solve the issue. Thanks!
Comment 14 Michael Grünewald 2015-05-24 10:14:34 UTC
Esp. is there anything required for mips64?
Comment 15 John Marino freebsd_committer 2015-05-24 10:53:40 UTC
my understand is that warner was saying, indirectly, that you need both 

BROKEN_mips 
and 
BROKEN_mips64

defined.  Apparently we are talking about 2 platforms here.

If I misunderstood then maybe it would be easier in warner or bruno produced the patch.
Comment 16 Michael Grünewald 2015-05-29 06:27:35 UTC
Sean, Warner, do you have any more thoughts on this topic?

Would it solve the issue appropriately if we add a broken message for mips
and mips64?  If not, what would be the list of architectures?

As silly as the question might look like, it is not that easy to find
the list of mips architectures as understood by FreeBSD, the first
really useful document I was able to find is

  https://bugs.freebsd.org/bugzilla/attachment.cgi?id=156292&action=edit

So it would really be nice to have a quick confirmation!
Comment 17 Sean Bruno freebsd_committer 2015-05-29 13:01:40 UTC
(In reply to Michael Grünewald from comment #16)
Yeah, mips & mips64 should be disabled and marked as broken for now.

BROKEN_mips=  No ASM Support For ${ARCH}
BROKEN_mips64= No ASM Support for ${ARCH}
Comment 18 Ed Maste freebsd_committer 2015-05-29 13:32:25 UTC
FWIW I've started collecting arch-specific details at https://wiki.freebsd.org/EdMaste/ArchitectureSpecifics. There are actually 6 different MIPS archs, but I assume nobody has really tried ports builds on the less common ones at all.
Comment 19 commit-hook freebsd_committer 2015-05-29 13:58:53 UTC
A commit references this bug:

Author: marino
Date: Fri May 29 13:58:13 UTC 2015
New revision: 387855
URL: https://svnweb.freebsd.org/changeset/ports/387855

Log:
  lang/ocaml: Set BROKEN on 2 new ARCHES

  The MIPS platforms can't build ocaml.  Set it and rework the BROKEN
  for sparc64 while here.

  PR:	197127

Changes:
  head/lang/ocaml/Makefile
Comment 20 John Marino freebsd_committer 2015-05-29 14:00:04 UTC
there's no reason to put ${ARCH} in broken message because it's already set in IGNORE.

This one is done (I reworked BROKEN for sparc64 while here)