Opened 3 years ago

Last modified 3 years ago

#61721 assigned defect

Failed to compile wine and wine-devel on 10.6.8

Reported by: lyssdod (Alex R) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: wine wine-devel

Description

Trying to compile wine and wine-devel on 10.6 results in following:

:info:build /opt/local/bin/clang-mp-9.0 -m64 -c -o loader.o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9/libs/wine/loader.c \
:info:build   -I. \
:info:build   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9/libs/wine \
:info:build   -I../../include \
:info:build   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9/include \
:info:build   -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement \
:info:build   -Wempty-body -Wignored-qualifiers -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits -Wvla \
:info:build   -Wwrite-strings -Wpointer-arith -I/opt/local/include -pipe -Os -arch x86_64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9/libs/wine/loader.c:435:18: warning: implicit declaration of function 'getsegmentdata' is invalid in C99 [-Wimplicit-function-declaration]
:info:build     code_end   = getsegmentdata(dli.dli_fbase, "__DATA", &data_size) - addr;
:info:build                  ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9/libs/wine/loader.c:435:70: error: invalid operands to binary expression ('int' and 'BYTE *' (aka 'unsigned char *'))
:info:build     code_end   = getsegmentdata(dli.dli_fbase, "__DATA", &data_size) - addr;
:info:build                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
:info:build 1 warning and 1 error generated.
:info:build make[1]: *** [loader.o] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9-x86_64/libs/wine'
:info:build make: *** [libs/wine] Error 2

I've tried both +universal and -universal variants, it always fails on the same line. Can compiler be the culprit? It seems quite recent though:

$ /opt/local/bin/clang-mp-9.0 --version
clang version 9.0.1 
Target: x86_64-apple-darwin10.8.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-9.0/bin

wine-master still have this line without any changes (https://github.com/wine-mirror/wine/blob/master/libs/wine/loader.c#L369), is there some specific patch missing?

Attached is i386 variant build log.

Or is it because of this configure line? :D

:info:configure checking whether the compiler supports -mmacosx-version-min=10.7 -nostartfiles -nodefaultlibs... no

Attachments (4)

wine_i386_build.log (340.1 KB) - added by lyssdod (Alex R) 3 years ago.
Screen shot 2020-12-02 at 10.46.35 PM.png (116.3 KB) - added by lyssdod (Alex R) 3 years ago.
success!
patch-wine-4.0.4-SnowLeopard.diff (3.3 KB) - added by kencu (Ken) 3 years ago.
0943D894-53F4-483A-BB87-69A4EF7A4C02.png (1020.8 KB) - added by Gcenx 3 years ago.
10.6.8 Server wine-6.0.1 launched winecfg

Download all attachments as: .zip

Change History (49)

Changed 3 years ago by lyssdod (Alex R)

Attachment: wine_i386_build.log added

comment:1 Changed 3 years ago by lyssdod (Alex R)

Summary: Failed to compile wine and wine-develFailed to compile wine and wine-devel on 10.6

comment:2 Changed 3 years ago by lyssdod (Alex R)

Summary: Failed to compile wine and wine-devel on 10.6Failed to compile wine and wine-devel on 10.6.8

comment:3 Changed 3 years ago by lyssdod (Alex R)

git blame suggests that it was added 2 years ago (around wine 3.14?), so it should have been definitely compiled by MacPorts since then... https://github.com/wine-mirror/wine/commit/bdca749f7ba4f434ac326481cf4fe0a059887f5d

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

I'm not planning on looking into any wine build failures until after I commit a long-overdue update I've been working on, since any build failures may already have been resolved in a newer version. It may also be that 10.6 is too old for wine to build on anymore.

comment:5 Changed 3 years ago by kencu (Ken)

I did build the current wine on 10.6.8 myself:

$ port -v installed wine
The following ports are currently installed:
  wine @4.0.4_0+universal+x11 (active) platform='darwin 10' archs='i386 x86_64' date='2020-07-02T08:10:03-0700'

and have the minor patches around here somewhere, but one of the add-on programs, mono I think, generated errors. And that one needs to be rebuilt using some kind of windows ming compiler setup -- so I threw in the towel there as it just wasn't worth that much work to me to do it for something that was never going to be upstreamed.

On that same box I can instead run ubuntu 20.10 with all the latest wine installs, qt 5.15, the current Firefox, Chrome, and Zoom -- so I just do that instead.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

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

Yes, I've done the ming compiler stuff in my local unpublished changes already. I just need to find time to finish it up.

comment:7 Changed 3 years ago by kencu (Ken)

Alex -- to get past this error:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_x11_wine-devel/wine-devel/work/wine-4.9/libs/wine/loader.c:435:70: error: invalid operands to binary expression ('int' and 'BYTE *' (aka 'unsigned char *'))
:info:build     code_end   = getsegmentdata(dli.dli_fbase, "__DATA", &data_size) - addr;

what you do is install libmacho, and then in the wine Portifle, add that as a link library like this:

configure.ldflags-append -lmacho

and that, together with building it with clang-5.0 instead of clang-9.0, got me most of the way. There was -- I think -- some other minor patching I had to do in one of the wine files relating to some internet stuff that was too new for 10.6.8. I think I saved those patches somewhere, I'm not 100% sure. I can look.

comment:8 Changed 3 years ago by jmroot (Joshua Root)

Cc: ryandesign removed
Owner: set to ryandesign
Port: wine wine-devel added
Status: newassigned

comment:9 Changed 3 years ago by jmroot (Joshua Root)

Do you perhaps have a mach-o/getsect.h header anywhere other than /usr/include?

comment:10 Changed 3 years ago by lyssdod (Alex R)

Port: wine wine-devel removed

Wow, thanks for info! I've installed mingw and libmacho, compiling with default Clang (9.0) failed as you predicted... On a side note, maybe libmacho should be specified as a dependency then?

Back to the main problem, how do I force the right compiler? Here https://trac.macports.org/wiki/UsingTheRightCompiler it says that it's possible to use ${configure.compiler} in the Portfile itself, but I don't quite understand the mapping between package name and actual binary. For example:

$ clang
clang                            clang-cpp-mp-9.0                 clang-mp-3.7
clang++                          clang-doc-mp-9.0                 clang-mp-5.0
clang++-mp-3.4                   clang-format                     clang-mp-9.0
clang++-mp-3.7                   clang-format-mp-3.4              clang-offload-bundler-mp-5.0
clang++-mp-5.0                   clang-format-mp-3.7              clang-offload-bundler-mp-9.0
clang++-mp-9.0                   clang-format-mp-5.0              clang-query-mp-5.0
clang-apply-replacements-mp-3.4  clang-format-mp-9.0              clang-query-mp-9.0
clang-apply-replacements-mp-3.7  clang-import-test-mp-5.0         clang-refactor-mp-9.0
clang-apply-replacements-mp-5.0  clang-import-test-mp-9.0         clang-rename-mp-5.0
clang-apply-replacements-mp-9.0  clang-include-fixer-mp-5.0       clang-rename-mp-9.0
clang-change-namespace-mp-5.0    clang-include-fixer-mp-9.0       clang-reorder-fields-mp-5.0
clang-change-namespace-mp-9.0    clang-modernize                  clang-reorder-fields-mp-9.0
clang-cl-mp-5.0                  clang-modernize-mp-3.4           clang-scan-deps-mp-9.0
clang-cl-mp-9.0                  clang-modernize-mp-3.7           clang-tidy-mp-9.0
clang-cpp-mp-5.0                 clang-mp-3.4

$ port installed clang-5.0
The following ports are currently installed:
  clang-5.0 @5.0.2_4+defaultlibcxx+emulated_tls+libstdcxx (active)

Should I put configure.compiler clang-5.0 (package name) or configure.compiler clang-mp-5.0 (binary name) there?

comment:11 Changed 3 years ago by lyssdod (Alex R)

Joshua –

$ find /usr/include -type f -name getsect.h -print 
/usr/include/mach-o/getsect.h

$ port contents libmacho-headers
Port libmacho-headers contains:
  /opt/local/include/mach-o/arch.h
  /opt/local/include/mach-o/arm/reloc.h
  /opt/local/include/mach-o/arm64/reloc.h
  /opt/local/include/mach-o/fat.h
  /opt/local/include/mach-o/getsect.h
  /opt/local/include/mach-o/i386/swap.h
  /opt/local/include/mach-o/ldsyms.h
  /opt/local/include/mach-o/loader.h
  /opt/local/include/mach-o/nlist.h
  /opt/local/include/mach-o/ppc/reloc.h
  /opt/local/include/mach-o/ppc/swap.h
  /opt/local/include/mach-o/ranlib.h
  /opt/local/include/mach-o/reloc.h
  /opt/local/include/mach-o/stab.h
  /opt/local/include/mach-o/swap.h
  /opt/local/include/mach-o/x86_64/reloc.h

comment:12 Changed 3 years ago by kencu (Ken)

the manual syntax is

sudo port -v install wine configure.compiler=macports-clang-5.0

but be prepared for errors as mentioned in a few source files that require actual patching.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:13 Changed 3 years ago by mf2k (Frank Schima)

Port: wine wine-devel added

comment:14 Changed 3 years ago by lyssdod (Alex R)

Thank you guys! Upon closer look at compiler errors I could make it and now I'm happily runing winetricks with wine-4.0.4 :)

I would appreciate any help in preparing the patches though:

Wasn't expecting it to be so easy (only 2 files haha), but so far so good! Thanks everyone!

Changed 3 years ago by lyssdod (Alex R)

success!

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

Again, there's probably no reason to submit any patches for the current wine ports since they are very outdated and I already have extensive changes made to the ports but not yet published. Trying to add patches to the existing ports now will just delay my ability to publish my more extensive updates.

comment:16 Changed 3 years ago by kencu (Ken)

did you not have any issues with mono or gecko? Maybe my issues were spurious. Or did you recompile mono/gecko?

I was getting launcher errors when I tried to run anything.

comment:17 Changed 3 years ago by kencu (Ken)

if you have patches prepared, please do post them here. This may be the last version of wine that runs on 10.6.8, and someone is sure to need it.

Ryan is preparing a new version of wine for eventual use. For now, I use the wine you can download from -- an interested MacPorts user who has updated the wine ports to the 5.x versions, built binaries with MacPorts, and uses those to publish to homebrew as casks. So the only way you can get a current MacPorts' installed wine right now is to install it with homebrew... which is kinda hilarious, but that is life as they say.

I'm running it right now on Catalina -- (but I just installed the binary, not with homebrew).

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:18 Changed 3 years ago by kencu (Ken)

I tried my installed wine again... with a 64 bit prefix (which is what I wanted for LTSpiceIV) I get menus without visible items in them, and crashes when wine quits in a system services .exe module. And screenfuls of memory allocation errors. With a 32 bit wine prefix, the menus are visible, and no crashes -- but still screenfuls of mem errors like this:

$ wine notepad
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000
preloader: Warning: failed to reserve range 00001000-00010000
preloader: Warning: failed to reserve range 00010000-00110000
preloader: Warning: failed to reserve range 00110000-68000000

I looked up what this might mean in the summer, and it said (I recall) that it had something to do with either mono or gecko I think, ergo that is why I thought I needed to recompile it.

but it does run notepad and the default installed things, and sound works. It's close I guess. And for all I know we'll be able to get the new 5.x version working too -- who knows? Haven't tried it.

comment:19 Changed 3 years ago by kencu (Ken)

I finally found my wine snowleopard patches -- I'll put them up here to see if yours were similar.

Changed 3 years ago by kencu (Ken)

comment:20 Changed 3 years ago by lyssdod (Alex R)

Hi Ken, yes, these are the same changes I ended up using. Your patch is looking properly though :D I've had no issues with mono/gecko, but I did install mingw port before – maybe it did help...

comment:21 Changed 3 years ago by Gcenx

I came across this when checking in the state of Macports wine Portfiles. As I’d like to update the Winehq macOS wiki but seems there’s still no need to yet.

According to the wine maintainers I’m in contact with only OS X 10.8 and greater are officially supported targets, so the README was updated accordingly to account for this and listed the minimum MacOSX.SDK required to compile it (10.10)

The last version of wine I was able to compile below 10.8 was 5.7 after this a MacOSX10.10.SDK or grater is required to get wine to compile, LegacySupport gets wine to compile but won’t run.

The Preloader spam about being unable to reserve memory would need to be adjusted for 10.6/10.7 respectively, 10.8 should be just fine and shouldn’t need any adjustments.

@Kencu It seems you’ve misunderstood my intentions. The Macports overlay was originally used with your +universal fixes for macOS Mojave, then updated the wine Portfiles to be more recent this expanded overtime due to other changes on Macports-ports. You’d originally tagged Ryan in an issue I’d opened on my overlay hoping to get feedback on the Portfiles before making any Pull-requests but as Ryan never responded ether due to lack of interest or was just busy so I closed the issue. The overlay is now used to override Macports-ports packages that are ether too new (rust/cargo) or too old (MoltenVK) or missing (jxrlib), or broken possibly only for Mojave (pango).

The wine-crossover package was originally added for some other projects to make use of instead of being forced to use Wineskin, the homebrew tap was expanded to allow installing of my own wine packages (user requests)

macOS_wine_builds was created due to the depreciation of Winehq macOS packing system as the original maintainers took the cross-compiler offline, there has been an attempt to replace this but as the builder was accessed remotely it wasn’t ideal, until an official replacement is brought online I keep uploading what I’ve built.

comment:22 Changed 3 years ago by kencu (Ken)

Your wine builds are fabulous. I'm running them this very minute. I'm using your "Wine Crossover.app" on BigSur. It says it is wine 4.12-1. For what I want it to do (run the Windows version of LTSpice IV on MacOS) I could not be happier.

I regret that my attentions have not focused on wine a great deal, other than hacking slightly on it above to make MacPorts' most recent versions work on 10.6 as a quick project, and working with you to get it building 32 bit on Mojave.

But this is off topic for this ticket, of course, so we should keep this particular ticket on the focus.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:23 Changed 3 years ago by Gcenx

Mingw is a hard requirement for wine on macOS as your forced to use Clang. That ignoring an arm64 compile where you’ll need clang-11 but building PE binaries with winebuild it still a work in progress and 99% useless target currently.

    { (void *)0x000000010000, 0x00100000 },  /* DOS area */
    { (void *)0x000000110000, 0x67ef0000 },  /* low memory area */

The first can mostly be ignored since modern wine will want to launch dosbox for anything dos. The second is warning doesn’t match, the low memory area hasn’t been altered since preloader was added.

The -mmacosx-version-min=10.7 is related to working around a linker issue for wineserver when compiling with Xcode10

comment:24 Changed 3 years ago by Gcenx

As Apple have released the Lion and Maintain Lion installers for free I wanted try to building modern wine on OSX 10.7.5

Currently no luck as the following fail to compile +universal

  • m4
  • bison
  • libtasn1

It would be nice to figure this out before any 10.7/10.6 specific things get completely removed as the official target is still 10.8+ as the plan is to drop all macOS only library calls and use open source libraries to aid in the PE conversion.

Edit; I think the next one was nettle?, I’ll check after work.

Last edited 3 years ago by Gcenx (previous) (diff)

comment:25 Changed 3 years ago by kencu (Ken)

those don't initially appear hard to fix...

comment:26 in reply to:  25 Changed 3 years ago by Gcenx

Replying to kencu:

those don't initially appear hard to fix...

I’m installing using the following command;

yes | port install wine-stable -x11 +quartz

I’ve only added the wine-* related Portfiles nothing else, if the above needed ports can be built and I manage to build wine I can ask about adding any needed patches into staging, the no-flicker patch was added into wine-staging-6.12.

Last edited 3 years ago by Gcenx (previous) (diff)

comment:27 Changed 3 years ago by kencu (Ken)

m4 +universal installed without any intervention:

$ port -v installed m4
The following ports are currently installed:
  m4 @1.4.19_1 requested_variants='' platform='darwin 11' archs='x86_64' date='2021-06-01T21:03:50-0700'
  m4 @1.4.19_1+universal (active) requested_variants='+universal' platform='darwin 11' archs='i386 x86_64' date='2021-07-03T13:38:30-0700'

comment:28 Changed 3 years ago by kencu (Ken)

bison +universal installed without touching the Portfile as well:

$ port -v installed bison
  bison @3.7.6_1+universal (active) requested_variants='+universal' platform='darwin 11' archs='i386 x86_64' date='2021-07-03T13:42:14-0700

comment:29 Changed 3 years ago by kencu (Ken)

and libtasn1:

$ port -v installed libtasn1
The following ports are currently installed:
  libtasn1 @4.17.0_0 requested_variants='' platform='darwin 11' archs='x86_64' date='2021-05-25T08:42:04-0700'
  libtasn1 @4.17.0_0+universal (active) requested_variants='+universal' platform='darwin 11' archs='i386 x86_64' date='2021-07-03T13:44:49-0700'

comment:30 Changed 3 years ago by kencu (Ken)

nettle is good too:

$ port -v installed nettle
The following ports are currently installed:
  nettle @3.7.3_0 requested_variants='' platform='darwin 11' archs='x86_64' date='2021-06-13T08:52:01-0700'
  nettle @3.7.3_0+universal (active) requested_variants='+universal' platform='darwin 11' archs='i386 x86_64' date='2021-07-03T13:50:32-0700'

If you still have universal build failures on your 10.7 system, post up a ticket for that port and a log and we will sort you out.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:31 Changed 3 years ago by Gcenx

@Kencu that's strange, but I did manage to build m4 by forcing clang-3.7

clang-5.0 & clang-9.0 both gave errors about being being unable to compile C code....

comment:32 Changed 3 years ago by kencu (Ken)

log needed to sort out. I just used the default compiler on 10.7, which I think was just /usr/bin/clang for all of them.

comment:33 in reply to:  32 Changed 3 years ago by Gcenx

Replying to kencu:

log needed to sort out. I just used the default compiler on 10.7, which I think was just /usr/bin/clang for all of them.

Seems something was just screwy with the Xcode install it's resolved and now macports-clang-5.0/9.0 are working again weird.

Currently waiting on the wine-stable-6.0.1 build to finish, I should have allocated more cores to that VM before starting that build.....

Not sure how the image fields should work but here https://cdn.discordapp.com/attachments/500633759863799841/861325824799670282/Screen_Shot_2021-07-04_at_3.06.12_PM.png

OSX 10.7.5 running wine-6.0.1

I can't do so much testing within the VM but Diablo II did load when forced to windowed mode same for Total Annihilation. I don't see any preloader spam but that could have been 10.6 specific.

Last edited 3 years ago by Gcenx (previous) (diff)

comment:34 Changed 3 years ago by kencu (Ken)

that looks great!

comment:35 in reply to:  34 Changed 3 years ago by Gcenx

Replying to kencu:

that looks great!

Too bad I can’t run 10.6 within a VM using VMWare Fusion, the attached patch does apply onto wine-6.0.1, need to test if this also applies onto wine-6.12 later.

I don’t remember if winemac.drv worked below 10.6.8, so I’d need to account for this within the Portfile to enforce +X11 but doesn’t figure out the check. Also still need to verify somethings but as CX21 is currently in beta I don’t want to bother anyone at CodeWeavers yet.

The only other thing would be does 10.6 get any preloader spam as 10.7 didn’t get any that I could see.

comment:36 Changed 3 years ago by kencu (Ken)

10.5 and 10.6 Server versions run in Parallels. I don't have VMWare Fusion to try.

10.4 runs in VirtualBox.

I use 10.6 on real hardware (daily). If you get 10.7 into a state where it is buildable for users I can see what happens on 10.6.

comment:37 in reply to:  36 ; Changed 3 years ago by Gcenx

Replying to kencu:

10.5 and 10.6 Server versions run in Parallels. I don't have VMWare Fusion to try.

10.4 runs in VirtualBox.

I use 10.6 on real hardware (daily). If you get 10.7 into a state where it is buildable for users I can see what happens on 10.6.

Pushed the changes to https://github.com/Gcenx/macports-wine/tree/OSX10.6, if your able to get it working decently on 10.6 I'll rebase and merge into the main branch with any other possible changes.

Not sure if this would be viable on 10.5 but if you also want to test there knock yourself out.

Edit; Some additional modifications are currently missing due to the lack of feedback from CodeWeavers devs, that will have to wait until after CX21 lands.

Edit2; Still unable to compile bison & m4, won't check the others as not really related so lightly better to just open new tickets for each Port I can't build with the default system compiler as they do build with mp-clang-3.7 and later.

Actually is there a way to force a newer compiler via macports.conf so I can just override any issues while testing within the VM(s)?

Last edited 3 years ago by Gcenx (previous) (diff)

comment:38 in reply to:  37 ; Changed 3 years ago by kencu (Ken)

Replying to Gcenx:

Actually is there a way to force a newer compiler via macports.conf so I can just override any issues while testing within the VM(s)?

Yes.

For a one-off override, you can do it on the command line, for example:

sudo port -v install myport configure.compiler=macports-llvm-gcc-4.2

For an entire setup to override the MacPorts default compiler selection process entirely, you can edit macports.conf and add some list of compilers such as this:

default_compilers  macports-clang-12 macports-clang-11 macports-clang-10 macports-clang-9.0

and (as I recall the process) the first on on that list that is not specifically blacklisted in the Portfile (or PortGroups) will be the one that is chosen.

The list of all the compilers you can select is here (but I see I need to update it)

https://trac.macports.org/wiki/UsingTheRightCompiler:

comment:39 Changed 3 years ago by asvitkine

I was just trying to install wine on 10.6 today as well.

Before wine build failed, the openal-soft build failed as well, but Ken suggested a workaround for that here which worked: https://github.com/macports/macports-ports/pull/11603#issuecomment-881056474

All the dependencies then succeeded but wine failed, with a similar error as the op:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_getsegmentdata", referenced from:
:info:build       _map_dll in loader.o

comment:40 in reply to:  38 Changed 3 years ago by Gcenx

Replying to kencu:

Replying to Gcenx:

Actually is there a way to force a newer compiler via macports.conf so I can just override any issues while testing within the VM(s)?

Yes.

For a one-off override, you can do it on the command line, for example:

sudo port -v install myport configure.compiler=macports-llvm-gcc-4.2

For an entire setup to override the MacPorts default compiler selection process entirely, you can edit macports.conf and add some list of compilers such as this:

default_compilers  macports-clang-12 macports-clang-11 macports-clang-10 macports-clang-9.0

and (as I recall the process) the first on on that list that is not specifically blacklisted in the Portfile (or PortGroups) will be the one that is chosen.

The list of all the compilers you can select is here (but I see I need to update it)

https://trac.macports.org/wiki/UsingTheRightCompiler:

Thanks Ken, I known about the command line argument but that get annoying the macports.conf is much nicer for the moment and yes it selects the first compiler in the list.

Last edited 3 years ago by Gcenx (previous) (diff)

comment:41 in reply to:  39 Changed 3 years ago by Gcenx

Replying to asvitkine:

I was just trying to install wine on 10.6 today as well.

Before wine build failed, the openal-soft build failed as well, but Ken suggested a workaround for that here which worked: https://github.com/macports/macports-ports/pull/11603#issuecomment-881056474

All the dependencies then succeeded but wine failed, with a similar error as the op:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_getsegmentdata", referenced from:
:info:build       _map_dll in loader.o

For this you need to modify the Portfile and add the following as per @Kencu

# https://trac.macports.org/ticket/61721
if {${os.major} < 11} {
    compiler.whitelist          macports-clang-5.0
    depends_build-append        port:libmacho
    configure.ldflags-append    -lmacho
    patchfiles-append           patch-wine-4.0.4-SnowLeopard.diff
}

Make sure to grab the attached patch as it's required for winemac.drv, ws2_32 & x11 to compile from what was discussed in the ticket already.

Last edited 3 years ago by Gcenx (previous) (diff)

comment:42 Changed 3 years ago by kencu (Ken)

I did give a try to your new wine-devel port. I got to the point of building it, and it needed only a small change in the patch to go against the new sources.

Then something happened related to the gstreamer ports and the MacOSX10.11.sdk (that was very slickly installed by the way, but in the wrong place for 10.6.8, but that's another story). -- it was some kind of a problem with the naming of the support libraries in the 10.11 SDK being different than the naming of the libraries in the 10.6.8 OSX root "/".

Anyway, that is where I stopped.

I am running the current 4.x wine from the MacPorts portfile, and it seems to work fine, but it does fill the terminal screen with various ominous-sounding warnings...

comment:43 in reply to:  42 Changed 3 years ago by Gcenx

Replying to kencu:

I did give a try to your new wine-devel port. I got to the point of building it, and it needed only a small change in the patch to go against the new sources.

Was this using the 10.6 branch?, as I thought I'd correctly updated the patch for wine-devel. If this was the 10.6 branch could you provide the updated patch.

Replying to kencu:

Then something happened related to the gstreamer ports and the MacOSX10.11.sdk (that was very slickly installed by the way, but in the wrong place for 10.6.8, but that's another story). -- it was some kind of a problem with the naming of the support libraries in the 10.11 SDK being different than the naming of the libraries in the 10.6.8 OSX root "/".

I can alter the SDK Port to install correctly below 10.8 but not sure how useful they would be. Weird that gstreamer tried to make use of the SDK when it shouldn't have. And thanks I did try to make the installing of the SDKs as simple as possible.

Replying to kencu:

Anyway, that is where I stopped.

I am running the current 4.x wine from the MacPorts portfile, and it seems to work fine, but it does fill the terminal screen with various ominous-sounding warnings...

If it works for your needs that's good but those memory allocation warning means somethings like .Net won't install and wine-mono only recently become partly useful.

Changed 3 years ago by Gcenx

10.6.8 Server wine-6.0.1 launched winecfg

comment:44 Changed 3 years ago by kencu (Ken)

That is just great! You are indeed the wine maestro.

comment:45 in reply to:  44 Changed 3 years ago by Gcenx

Replying to kencu:

That is just great! You are indeed the wine maestro.

Still needs work, the major problem being wine-preloader checks failed so it was skipped, without that wine is mostly useless this wasn’t the case for 10.7.

Note: See TracTickets for help on using tickets.