rayarachelian / lisaem-1.2.x

Apple Lisa Emulator v1.2.x
http://lisaem.sunder.net
Other
36 stars 11 forks source link

64-bit check fails in build.sh $DARWIN check. #12

Closed adespoton closed 4 years ago

adespoton commented 4 years ago
  if [[ -n "$SIXTYFOURBITS" ]]
   then

-- this fails in Catalina, defaulting it to the 32 bit configuration.

adespoton commented 4 years ago

Contact me if you need any testing as you build out for macOS. lisaem binary fails to build even under 64bit, lisafsh-tool builds, but when run returns /usr/local/bin/lisafsh-tool: Bad CPU type in executable

rayarachelian commented 4 years ago

Hi, Em, I've got the scripts working now, please do a pull; what you saw wasn't fully fleshed out, it does now compile and launch, at least on 10.11 as x86_64 instead of segfaulting immediately. I've added a scripts directory which allows builds of wxWidgets suitable for LisaEm use. I haven't fully tested this LisaEm on macos X just yet, much more testing is needed.

rayarachelian commented 4 years ago

Looks like there's a segfault caused by the delete at line 7772 that I need to fix, and possibly more

adespoton commented 4 years ago

Hmm; seems it's not cooperating with my brew install of wxwidgets, nor my manual pull and compile of 2.8 or 3.1. Not quite sure what I'm doing wrong here....

rayarachelian commented 4 years ago

Hi, how are you building wxWidgets? Pls try the scripts under the scripts folder, they should do the right thing if you download and extract wxWidgets right underneath the scripts dir.

It should also work with clang now. If you get an error about 'tr1/type_traits' when building LisaEm, see the readme in the scripts dir and patch the include/wx-3.1/wx/strvararg.h file as directed, but I think it won't come up anymore.

Also don't use wx2.8 as it's too far away from 1.2.7 and is missing some methods that 1.2.7 uses. You'd want at minimum wx3.0.4, wx3.1.2 is preferred, or you can try 3.1.1 if there are issues with 3.1.2.

You can edit the VAR variable in the build script to use another version than 3.1.2 such as 3.1.1 or 3.0.4.

rayarachelian commented 4 years ago

I've just updated the scripts/build-wx3.1.2-modern-macosx.sh script to also fetch the wx source code too.

adespoton commented 4 years ago

Getting further...

Linking ./bin/LisaEm.app ld: library not found for -lstdc++.6 clang: error: linker command failed with exit code 1 (use -v to see invocation)

WxWidgets seems to be fully compiling and linking now; it's just your code that is having linking issues with clang.

rayarachelian commented 4 years ago

So let's see if we can find it, can you run:

sudo find / -name libstdc++.6.* -ls 2>/dev/null

And then once you find it let me know the path. If you can't find it at all, it's possible it's been removed from Catalina and we'll need to find some other compatible library. Maybe it's got a full version or maybe it's in a different place if you use XCode vs the Xcode command line tools.

Likely it might be somewhere under /Develop and under an SDK, but who knows what Apple did on Catalina (we'll I guess I'll find out once I install it myself as well) :smile_cat:

If you do find it, we'll need to add it as -L {path} where the path is to the containing directory to line 845 like so:

845         export SYSLIBS="-L /usr/lib/whatever -lstdc++.6"
rayarachelian commented 4 years ago

looks like it needs to be: export SYSLIBS="-lstdc++"