Opened 13 years ago

Closed 12 years ago

#30388 closed defect (fixed)

mono fails to build on 10.7

Reported by: rb@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.0
Keywords: lion Cc: notstop@…, johnkfisher@…, jean-philippe.humbert@…, billc.cn@…, mmpestorich (Mike M Pestorich), g5pw (Aljaž Srebrnič), ryandesign (Ryan Carsten Schmidt)
Port: mono

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Upgraded to MacPorts 2.0.0 today and tried to install mono. The build fails with a #error:

:info:build /usr/include/ucontext.h:43:2: error: #error The deprecated ucontext routines require _XOPEN_SOURCE to be defined

Logs attached.

Attachments (2)

main.log (66.4 KB) - added by rb@… 13 years ago.
main.log from attempting to build mono
mono-2.6.7_make-output.log (9.2 KB) - added by ttorling@… 13 years ago.
Output from /usr/bin/make -w all (MacPorts 2.0.1 on OS X 10.7)

Download all attachments as: .zip

Change History (19)

Changed 13 years ago by rb@…

Attachment: main.log added

main.log from attempting to build mono

comment:1 Changed 13 years ago by rb@…

Cc: rb@… added

Cc Me!

comment:2 Changed 13 years ago by jmroot (Joshua Root)

Cc: rb@… removed
Keywords: lion added
Summary: mono fails to buildmono fails to build on 10.7

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: notstop@… added

Has duplicate #30408.

comment:5 Changed 13 years ago by johnkfisher@…

Cc: johnkfisher@… added

Cc Me!

comment:6 Changed 13 years ago by jean-philippe.humbert@…

Cc: jean-philippe.humbert@… added

Cc Me!

Changed 13 years ago by ttorling@…

Attachment: mono-2.6.7_make-output.log added

Output from /usr/bin/make -w all (MacPorts 2.0.1 on OS X 10.7)

comment:7 Changed 13 years ago by billc.cn@…

Cc: billc.cn@… added

Cc Me!

comment:8 Changed 13 years ago by craig-tanis@…

I got it to compile by adding "#define _XOPEN_SOURCE 600" at the top of mono/utils/mono-sigcontext.h

comment:9 Changed 13 years ago by mmpestorich (Mike M Pestorich)

Cc: mmpestorich@… added

Cc Me!

comment:10 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Is this still a problem with mono @2.10.6?

comment:11 in reply to:  10 Changed 12 years ago by notstop@…

Replying to ryandesign@…:

Is this still a problem with mono @2.10.6?

No

comment:12 Changed 12 years ago by reid@…

I disagree. I just tried to install mono and got this error (snow leopard).

comment:13 Changed 12 years ago by reid@…

After adding _XOPEN_SOURCE as above, I get this:

mini-amd64.c: In function ‘mono_arch_skip_single_step’:
mini-amd64.c:8521: warning: cast to pointer from integer of different size
mini-amd64.c:8521: warning: cast from pointer to integer of different size
mini-amd64.c: In function ‘cpuid’:
mini-amd64.c:1244: error: can't find a register in class ‘BREG’ while reloading ‘asm’
mini-amd64.c:1244: error: ‘asm’ operand has impossible constraints
make[4]: *** [libmono_2_0_la-mini-amd64.lo] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_mono/mono/work/mono-2.10.6/mono/mini'

...

comment:14 Changed 12 years ago by notstop@…

i didn't tweak any "#define _XOPEN_SOURCE 600" or such, just port selfupdate and so on.

comment:15 Changed 12 years ago by g5pw (Aljaž Srebrnič)

I got it to work under Lion by adding the following to the portfile:

configure.ldflags-append -L/opt/local/lib

comment:16 in reply to:  15 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: a2piratesoft@… ryandesign@… added

Replying to a2piratesoft@…:

I got it to work under Lion by adding the following to the portfile:

configure.ldflags-append -L/opt/local/lib

That seems unlikely; -L/opt/local/lib is already in configure.ldflags by default.

comment:17 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Mono has built on Lion since at least 2.10.6: http://packages.macports.org/mono/

Note: See TracTickets for help on using tickets.