Bug 191049 - lang/maude: Stagify; fix parser/lexer build fixes; modernise LIB_DEPENDS; add LICENSE
Summary: lang/maude: Stagify; fix parser/lexer build fixes; modernise LIB_DEPENDS; add...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Thomas Zander
URL:
Keywords:
: 189390 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-15 03:59 UTC by Keith Gaughan
Modified: 2014-09-03 20:17 UTC (History)
5 users (show)

See Also:


Attachments
maude.patch.txt (3.68 KB, patch)
2014-06-15 15:38 UTC, Keith Gaughan
no flags Details | Diff
only use this on FreeBSD 10; fixes 'int&' compiler issues with Mixfix/lexer.ll (3.45 KB, patch)
2014-07-06 15:16 UTC, Johannes 5
no flags Details | Diff
fix build with clang (11.69 KB, patch)
2014-09-03 08:09 UTC, Carlos J Puga Medina
no flags Details | Diff
fix build with clang (11.63 KB, patch)
2014-09-03 18:22 UTC, Carlos J Puga Medina
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Gaughan 2014-06-15 03:59:00 UTC
This patch makes the port safe for staging, fixes a bug when building the parser and lexer, fixes the old-style port references in LIB_DEPENDS, and adds LICENSE.

This does not, to my knowledge, fix the build issue under clang mentioned in #189390.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-06-15 04:28:03 UTC
Notify maintainer.
Comment 2 Keith Gaughan 2014-06-15 15:38:20 UTC
Created attachment 143807 [details]
maude.patch.txt

Huh. I just noticed I forgot to attach the patch. Better fix that!

If the maintainer doesn't reply, I'll take over maintainership.
Comment 3 Johannes 5 2014-06-30 16:08:28 UTC
(In reply to Keith Gaughan from comment #0)
> This patch makes the port safe for staging, fixes a bug when building the
> parser and lexer, fixes the old-style port references in LIB_DEPENDS, and
> adds LICENSE.
[...]
(In reply to Keith Gaughan from comment #2)
> Created attachment 143807 [details]
> maude.patch.txt
> Huh. I just noticed I forgot to attach the patch. Better fix that!

Thanx for the patch! For me it produced a usable maude on FreeBSD
9.2-STABLE amd64 with the base system's gcc42 as well as with
ports/gcc46. I approve the patch.

> If the maintainer doesn't reply, I'll take over maintainership.

Great - thanx a lot for volunteering! So for me it would be nice if
the committer who handles this PR will pass maintainership to you. In
case you update your patch before the commit you might want to change
the MAINTAINER line as well.

> This does not, to my knowledge, fix the build issue under clang
> mentioned in #189390.

As mentioned there, I can't see an immediate solution for building
maude with clang (i.e. without gcc's 'ext/rope'). If you also don't
have a solution at hand, then I suggest that you add USE_GCC=any to the
port's Makefile. This won't hurt, because gcc can't fail worse than
clang does, but it would supply logs from the build cluster [1], which
might help you in getting maude to compile (and link (and run;)) on
FreeBSD 10 using gcc. (Unfortunately I failed to get it to work on
10-STABLE - I managed to compile it, but linking failed:-(

If there's anything else I could do for the maude port, please let me
know.

Cheers!
Johannes

[1] <http://portsmon.freebsd.org/portoverview.py?category=lang&portname=maude>
Comment 4 Thomas Zander freebsd_committer freebsd_triage 2014-07-05 06:53:01 UTC
This does not build on 10.0 amd64.
First, the port Makefile needs USE_GCC because there is no ext/rope include in clang, but even after building with GCC, I get this:

<stdout>: In function 'int yy_get_next_buffer()':
<stdout>:4678:3: error: invalid initialization of reference of type 'int&' from expression of type 'yy_size_t {aka long unsigned int}'
In file included from ./lexer.ll:46:0:
lexerAux.hh:30:6: error: in passing argument 2 of 'void getInput(char*, int&, int)'
*** [libmixfix_a-lexer.o] Error code 1


Could you take a look?
Comment 5 Johannes 5 2014-07-06 14:55:27 UTC
(In reply to Thomas Zander from comment #4)
> This does not build on 10.0 amd64.

Yes, same over here on 10.0-STABLE i386.

> First, the port Makefile needs USE_GCC because there is no ext/rope include
> in clang

I agree. But maybe Keith is working on an ext/rope for clang?

> but even after building with GCC, I get this:
> 
> <stdout>: In function 'int yy_get_next_buffer()':
> <stdout>:4678:3: error: invalid initialization of reference of type 'int&'
> from expression of type 'yy_size_t {aka long unsigned int}'
> In file included from ./lexer.ll:46:0:
> lexerAux.hh:30:6: error: in passing argument 2 of 'void getInput(char*,
> int&, int)'
> *** [libmixfix_a-lexer.o] Error code 1
> 
> Could you take a look?

As I mentioned briefly in comment #3, I could get past that point (by
patching Mixfix/lexer.ll, Mixfix/lexerAux.cc, and Mixfix/lexerAux.hh -
I'll try to attach that patch set after posting this comment.)
But even successful compilation did not prevent that linking the final
maude exectutable fails:

g++46  -O2 -pipe -march=pentium-mmx -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc46  -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc46 -L/usr/local/lib/gcc46  -o maude maude-main.o ../Mixfix/libmixfix.a  ../StrategyLanguage/libstrategyLanguage.a  ../Meta/libmeta.a  ../ObjectSystem/libobjectSystem.a  ../BuiltIn/libbuiltIn.a  ../Higher/libhigher.a  ../FreeTheory/libfreeTheory.a  ../AU_Theory/libAU_Theory.a  ../AU_Persistent/libAU_Persistent.a  ../ACU_Theory/libACU_Theory.a  ../ACU_Persistent/libACU_Persistent.a  ../CUI_Theory/libCUI_Theory.a  ../S_Theory/libS_Theory.a  ../NA_Theory/libNA_Theory.a  ../Variable/libvariable.a  ../Interface/libinterface.a  ../Core/libcore.a  ../MSCP10/libmscp10.a  ../Temporal/libtemporal.a  ../IO_Stuff/libIO_Stuff.a    ../Utility/libutility.a  -lbdd  -ltecla -lcurses  -lsigsegv  -lgmpxx -lgmp  ../3rdParty/libdlmalloc.a 
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o): In function `MixfixModule::handleDivision(std::basic_ostream<char, std::char_traits<char> >&, DagNode*, bool, char const*)':
mixfixModule.cc:(.text+0x1018a): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, __mpz_struct const*)'
mixfixModule.cc:(.text+0x101b7): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, __mpz_struct const*)'
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o): In function `MixfixModule::handleMinus(std::basic_ostream<char, std::char_traits<char> >&, DagNode*, bool, char const*)':
mixfixModule.cc:(.text+0x102f4): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, __mpz_struct const*)'
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o): In function `MixfixModule::handleDivision(std::basic_ostream<char, std::char_traits<char> >&, Term*, bool, char const*)':
mixfixModule.cc:(.text+0x1078f): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, __mpz_struct const*)'
mixfixModule.cc:(.text+0x107bc): undefined reference to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, __mpz_struct const*)'
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o):mixfixModule.cc:(.text+0x108fb): more undefined references to `operator<<(std::basic_ostream<char, std::char_traits<char> >&, __mpz_struct const*)' follow
collect2: ld returned 1 exit status
*** [maude] Error code 1

(I used gcc46 here because lang/gcc (4.7.3) does not compile on that
(very slow;) FreeBSD 10.0-STABLE i386 machine. Maybe you'll be more
lucky with better equipment ...) (Another side note is that Keith's
patches to Mixfix/Makefile.am and Mixfix/lexer.ll do not seem to be
necessary on FreeBSD 10, which is another difference to FreBSD 9.)
Comment 6 Johannes 5 2014-07-06 15:16:24 UTC
Created attachment 144463 [details]
only use this on FreeBSD 10; fixes 'int&' compiler issues with Mixfix/lexer.ll
Comment 7 Thomas Zander freebsd_committer freebsd_triage 2014-07-12 17:44:04 UTC
(In reply to joemann from comment #6)
> Created attachment 144463 [details]
> only use this on FreeBSD 10; fixes 'int&' compiler issues with
> Mixfix/lexer.ll

Sorry, but this patch does not build on any supported system.
On 9.2 I get it to build only by adding MAKE_JOBS_UNSAFE=yes.

On 10.0, however, this does not help:
[...]
g++47  -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc47 -fno-strict-aliasing -Wl,-rpath=/usr/local/lib/gcc47  -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc47 -L/usr/local/lib/gcc47  -o maude maude-main.o ../Mixfix/libmixfix.a  ../StrategyLanguage/libstrategyLanguage.a  ../Meta/libmeta.a  ../ObjectSystem/libobjectSystem.a  ../BuiltIn/libbuiltIn.a  ../Higher/libhigher.a  ../FreeTheory/libfreeTheory.a  ../AU_Theory/libAU_Theory.a  ../AU_Persistent/libAU_Persistent.a  ../ACU_Theory/libACU_Theory.a  ../ACU_Persistent/libACU_Persistent.a  ../CUI_Theory/libCUI_Theory.a  ../S_Theory/libS_Theory.a  ../NA_Theory/libNA_Theory.a  ../Variable/libvariable.a  ../Interface/libinterface.a  ../Core/libcore.a  ../MSCP10/libmscp10.a  ../Temporal/libtemporal.a  ../IO_Stuff/libIO_Stuff.a    ../Utility/libutility.a  -lbdd  -ltecla -lcurses  -lsigsegv  -lgmpxx -lgmp  ../3rdParty/libdlmalloc.a 
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o): In function `MixfixModule::handleDivision(std::ostream&, DagNode*, bool, char const*)':
mixfixModule.cc:(.text+0xff23): undefined reference to `operator<<(std::ostream&, __mpz_struct const*)'
mixfixModule.cc:(.text+0xff47): undefined reference to `operator<<(std::ostream&, __mpz_struct const*)'
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o): In function `MixfixModule::handleMinus(std::ostream&, DagNode*, bool, char const*)':
mixfixModule.cc:(.text+0x10070): undefined reference to `operator<<(std::ostream&, __mpz_struct const*)'
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o): In function `MixfixModule::handleDivision(std::ostream&, Term*, bool, char const*)':
mixfixModule.cc:(.text+0x10565): undefined reference to `operator<<(std::ostream&, __mpz_struct const*)'
mixfixModule.cc:(.text+0x10589): undefined reference to `operator<<(std::ostream&, __mpz_struct const*)'
../Mixfix/libmixfix.a(libmixfix_a-mixfixModule.o):mixfixModule.cc:(.text+0x106b2): more undefined references to `operator<<(std::ostream&, __mpz_struct const*)' follow
collect2: error: ld returned 1 exit status
*** Error code 1

Stop.
make[4]: stopped in /wrkdirs/usr/ports/lang/maude/work/Maude-2.6/src/Main
*** Error code 1

Stop.
make[3]: stopped in /wrkdirs/usr/ports/lang/maude/work/Maude-2.6/src
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/lang/maude/work/Maude-2.6
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/lang/maude/work/Maude-2.6
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/maude

Thanks for taking a look!
Comment 8 John Marino freebsd_committer freebsd_triage 2014-08-07 16:08:10 UTC
*** Bug 189390 has been marked as a duplicate of this bug. ***
Comment 9 John Marino freebsd_committer freebsd_triage 2014-08-31 09:51:05 UTC
I don't want to put pressure on you Keith, but this port could be deleted as soon as tomorrow.  It's not staged.
Comment 10 Keith Gaughan 2014-08-31 17:36:54 UTC
(In reply to John Marino from comment #9)

> I don't want to put pressure on you Keith, but this port could be deleted as
> soon as tomorrow.  It's not staged.

I'm going to give up banging my head against the wall to get it working with clang. I had my Redports account approved a while back, so I'll see if I can find a version of GCC that'll be happy building Maude on FreeBSD 10.
Comment 11 Carlos J Puga Medina 2014-09-03 08:09:34 UTC
Created attachment 146718 [details]
fix build with clang

The following patch

- Add LICENSE_FILE.
- Add DOCS option.
- Fix build with clang.

Tested on 11-CURRENT/i386. If no one provides the test build of the different platforms, I will.
Comment 12 Thomas Zander freebsd_committer freebsd_triage 2014-09-03 13:49:58 UTC
(In reply to Carlos Jacobo Puga Medina from comment #11)
> Created attachment 146718 [details]
> fix build with clang
> 
> The following patch
> 
> - Add LICENSE_FILE.
> - Add DOCS option.
> - Fix build with clang.
> 
> Tested on 11-CURRENT/i386. If no one provides the test build of the
> different platforms, I will.

Tested on 10-STABLE amd64 and 9.3-R i386, both builds fail here:
c++ -DHAVE_CONFIG_H -I. -I../..  -I../../src/Utility  -I../../src/Temporal  -I../../src/Interface  -I../../src/Core  -I../../src/Variable  -I../../src/FullCompiler  -I../../src/Higher  -I../../src/CUI_Theory  -I../../src/S_Theory  -I../../src/NA_Theory  -I../../src/FreeTheory  -I../../src/ObjectSystem  -I../../src/Mixfix  -I../../src/BuiltIn  -I../../src/MSCP10  -I../../src/IO_Stuff  -I../../src/ACU_Persistent  -I../../src/ACU_Theory  -I../../src/AU_Persistent  -I../../src/AU_Theory  -I../../src/Meta  -I../../src/3rdParty  -I../../src/FullCompiler  -I../../src/StrategyLanguage -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -MT libmixfix_a-lexer.o -MD -MP -MF .deps/libmixfix_a-lexer.Tpo -c -o libmixfix_a-lexer.o `test -f 'lexer.cc' || echo './'`lexer.cc
./lexer.ll: In function 'int yy_get_next_buffer()':
./lexer.ll:826: error: invalid initialization of reference of type 'size_t&' from expression of type 'int'
lexerAux.hh:30: error: in passing argument 2 of 'void getInput(char*, size_t&, int)'
*** [libmixfix_a-lexer.o] Error code 1
Comment 13 Thomas Zander freebsd_committer freebsd_triage 2014-09-03 14:01:16 UTC
Adding MAKE_JOBS_UNSAFE gets it to build on 10, but not on 9.x.
Comment 14 John Marino freebsd_committer freebsd_triage 2014-09-03 14:15:23 UTC
(In reply to Thomas Zander from comment #13)
> Adding MAKE_JOBS_UNSAFE gets it to build on 10, but not on 9.x.

Maybe try using the ports flex instead of base flex?
Comment 15 Carlos J Puga Medina 2014-09-03 14:19:53 UTC
Please, try after removing this couple of patches:

- patch-src__Mixfix__lexerAux.cc
- patch-src__Mixfix__lexerAux.hh
Comment 16 Thomas Zander freebsd_committer freebsd_triage 2014-09-03 15:10:40 UTC
Looks like we are getting somewhere. Removal of said patches breaks the build on 10, but makes it compile on 9.3
Comment 18 commit-hook freebsd_committer freebsd_triage 2014-09-03 19:58:52 UTC
A commit references this bug:

Author: riggs
Date: Wed Sep  3 19:58:39 UTC 2014
New revision: 367223
URL: http://svnweb.freebsd.org/changeset/ports/367223

Log:
  - Stagify
  - Fix build on clang
  - Add MAKE_JOBS_UNSAFE
  - Add LICENSE
  - Add DOCS option
  - Bump PORTREVISION
  - Pet portlint

  PR:		191049
  Submitted by:	k@stereochro.me
  Reviewed by:	cpm@fbsd.es, joemann@beefree.free.de, marino, riggs
  Final patch by:	cpm@fbsd.es, riggs
  MFH:		2014Q3

Changes:
  head/lang/maude/Makefile
  head/lang/maude/files/extra-patch-Mixfix-lexerAux
  head/lang/maude/files/patch-src__BuiltIn__stringOpSymbol.cc
  head/lang/maude/files/patch-src__Mixfix__bottom.yy
  head/lang/maude/files/patch-src__Mixfix__commands.yy
  head/lang/maude/files/patch-src__Mixfix__interact.cc
  head/lang/maude/files/patch-src__Mixfix__modules.yy
  head/lang/maude/files/patch-src__Mixfix__token.cc
  head/lang/maude/files/patch-src__Mixfix__top.yy
  head/lang/maude/files/patch-src__ObjectSystem__configSymbol.hh
  head/lang/maude/files/patch-src__ObjectSystem__objectMap.cc
  head/lang/maude/files/patch-src__ObjectSystem__objectSystemRewritingContext.hh
  head/lang/maude/files/patch-src__Utility__ropeStuff.hh
Comment 19 commit-hook freebsd_committer freebsd_triage 2014-09-03 20:17:55 UTC
A commit references this bug:

Author: riggs
Date: Wed Sep  3 20:17:36 UTC 2014
New revision: 367226
URL: http://svnweb.freebsd.org/changeset/ports/367226

Log:
  MFH: r367223

  - Stagify
  - Fix build on clang
  - Add MAKE_JOBS_UNSAFE
  - Add LICENSE
  - Add DOCS option
  - Bump PORTREVISION
  - Pet portlint

  PR:		191049
  Submitted by:	k@stereochro.me
  Reviewed by:	cpm@fbsd.es, joemann@beefree.free.de, marino, riggs
  Final patch by:	cpm@fbsd.es, riggs
  Approved by:	portmgr (erwin)

Changes:
_U  branches/2014Q3/
  branches/2014Q3/lang/maude/Makefile
  branches/2014Q3/lang/maude/files/extra-patch-Mixfix-lexerAux
  branches/2014Q3/lang/maude/files/patch-src__BuiltIn__stringOpSymbol.cc
  branches/2014Q3/lang/maude/files/patch-src__Mixfix__bottom.yy
  branches/2014Q3/lang/maude/files/patch-src__Mixfix__commands.yy
  branches/2014Q3/lang/maude/files/patch-src__Mixfix__interact.cc
  branches/2014Q3/lang/maude/files/patch-src__Mixfix__modules.yy
  branches/2014Q3/lang/maude/files/patch-src__Mixfix__token.cc
  branches/2014Q3/lang/maude/files/patch-src__Mixfix__top.yy
  branches/2014Q3/lang/maude/files/patch-src__ObjectSystem__configSymbol.hh
  branches/2014Q3/lang/maude/files/patch-src__ObjectSystem__objectMap.cc
  branches/2014Q3/lang/maude/files/patch-src__ObjectSystem__objectSystemRewritingContext.hh
  branches/2014Q3/lang/maude/files/patch-src__Utility__ropeStuff.hh