Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The MXP Build System on Big Sur
#1
I've been trying to migrate my builds over to Big Sur, and so far I've found i had to to do two things: add all the executables in the platform folder to security exceptions in System Preferences. And add: #include <sys/ioctl.h> to _psutil_posix.c

And I've tried building with the Mojave SDK and it builds fine with out errors. However when launching the build in debug mode i get the following error:

Process 86244 launched: '/Volumes/t1_backup/silver_2/basilisk/obj-x86_64-apple-darwin20.5.0/dist/Silver.app/Contents/MacOS/basilisk' (x86_64)
2021-08-19 16:27:04.562747+0000 basilisk[86244:7238718] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=86244
2021-08-19 16:27:04.562938+0000 basilisk[86244:7238718] SecTaskCopyDebugDescription: basilisk[86244]/0#-1 LF=0
2021-08-19 16:27:05.008296+0000 basilisk[86244:7238718] WARNING: The Gestalt selector gestaltSystemVersion is returning 10.9.0 instead of 10.16.0. This is not a bug in Gestalt -- it is a documented limitation. Use NSProcessInfo's operatingSystemVersion property to get correct system version number.
Call location:
2021-08-19 16:27:05.008368+0000 basilisk[86244:7238718] 0  CarbonCore                          0x00007fff228be2d1 ___Gestalt_SystemVersion_block_invoke + 112
2021-08-19 16:27:05.008393+0000 basilisk[86244:7238718] 1  libdispatch.dylib                  0x00007fff2024a806 _dispatch_client_callout + 8
2021-08-19 16:27:05.008415+0000 basilisk[86244:7238718] 2  libdispatch.dylib                  0x00007fff2024b98c _dispatch_once_callout + 20
2021-08-19 16:27:05.008436+0000 basilisk[86244:7238718] 3  CarbonCore                          0x00007fff2285fa72 _Gestalt_SystemVersion + 944
2021-08-19 16:27:05.008444+0000 basilisk[86244:7238718] 4  CarbonCore                          0x00007fff2285f688 Gestalt + 149
2021-08-19 16:27:05.008453+0000 basilisk[86244:7238718] 5  XUL                                0x00000001048249fd WebPGetColorPalette + 498691
Process 86244 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x7ffe00002007)
    frame #0: 0x000000010436a084 XUL`___lldb_unnamed_symbol183870$$XUL + 240
XUL`___lldb_unnamed_symbol183870$$XUL:
->  0x10436a084 <+240>: movq  $0x0, (%rax)
    0x10436a08b <+247>: leaq  0x1f30506(%rip), %rax
    0x10436a092 <+254>: cmpl  $0x0, (%rax)
    0x10436a095 <+257>: je    0x10436a0a9              ; <+277>
Target 0: (basilisk) stopped.


Which I'm pretty sure is a codesign problem. My first assumptions are that the privileges are somehow not being granted properly to some executable or script, because I've tried with the exact same configurations as on Mojave but the only different variable being that the build is on Big Sur. I've tried building with verbose mode but i don't seem to see error messages pertaining to ungranted privileges (probably because it just fails silently). Any ideas on what can be done?

On a side note i was also wondering if there's any progress toward building on apple silicon. I took the first steps towards trying it out by using the python script 2to3 to convert everything to python3 but i encountered some errors and eventually after fixing all the explicit errors the most obvious error i got was that the output folder's name was corrupted in that it contained an extra 'b' letter in the name caused by python2 strings being prefixed with 'b's to convert string so to byte strings.
Reply
#2
(08-20-2021, 01:26 PM)noobsoftware Wrote: Which I'm pretty sure is a codesign problem. My first assumptions are that the privileges are somehow not being granted properly to some executable or script, because I've tried with the exact same configurations as on Mojave but the only different variable being that the build is on Big Sur. I've tried building with verbose mode but i don't seem to see error messages pertaining to ungranted privileges (probably because it just fails silently). Any ideas on what can be done?

On a side note i was also wondering if there's any progress toward building on apple silicon. I took the first steps towards trying it out by using the python script 2to3 to convert everything to python3 but i encountered some errors and eventually after fixing all the explicit errors the most obvious error i got was that the output folder's name was corrupted in that it contained an extra 'b' letter in the name caused by python2 strings being prefixed with 'b's to convert string so to byte strings.

Can you get a backtrace from that crash?  The unnamed symbol makes it a bit hard to see where in the code it is crashing.

I build on Big Sur for testing, but I have found that the binaries are slightly unstable when using high optimization levels... and when I debug problems I turn optimizations off.....  what I have been using for testing on Big Sur is this .mozconfig:

Code:
# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --enable-optimize=-O0
ac_add_options --enable-jemalloc
#ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --disable-eme
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
ac_add_options --with-macos-sdk=/Users/xxxx/SDKs/MacOSX10.12.sdk

# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
#ac_add_options --enable-official-branding
#export MOZILLA_OFFICIAL=1
ac_add_options --with-branding=palemoon/branding/whitestar

# Uncomment if using clang++ from Xcode 10 or higher
export CXX="/usr/bin/clang++ -std=gnu++11 -stdlib=libc++"

Try building like that then when you ./mach run --debug

Try to get a backtrace from it... so you can see all the symbols to identify the location of the crash.

I have abandoned trying to get it working on Apple Silicon for now, that was my plan before the Pale Moon split... it kind of feels like ultimately it will be a waste of effort since they seem intent on removing everything Mac from the code. Unless I get some sponsorship or something to do this more than in my free time.

Brian
Reply
#3
I definitely hope that MXP has a bright future and I hope people that use MXP based browsers will lend their support to you or lend support to development of the platform because this is definitely a worth-while platform. If i have a chance to i will definitely lend my support to the sponsorship part. I already have NoobMusic well on way in development and plan to try to develop even more applications, besides from being totally reliant on the MXP based browsers. I don't know if the Pale Moon guys realize who much less value UXP has when it only for a single a platform and disregard a huge opportunity for the future. I wonder if they can be convinced of the value of mac as a platform, or possibly have their minds changed if we get Apple Silicon up and running since that was one of the reasons for abandoning mac.

I will keep trying my best to get the apple silicon builds going, I can create a github repo for it so if anyone wants to lend their support or contribute to the effort they can. But there is obviously much work to be done, and an uncertainty as you have stated.
Reply
#4
Your mozconfig worked, thanks.

MXP apple silicon repo: https://github.com/siggi90/MXP_applesilicon
Reply
#5
I get this error with optimization set to: ac_add_options --enable-optimize=-Os
and using the Mojave sdk

2021-08-21 07:08:23.301591+0000 basilisk[52941:8267159] 0 CarbonCore 0x00007fff228be2d1 ___Gestalt_SystemVersion_block_invoke + 112
2021-08-21 07:08:23.301615+0000 basilisk[52941:8267159] 1 libdispatch.dylib 0x00007fff2024a806 _dispatch_client_callout + 8
2021-08-21 07:08:23.301624+0000 basilisk[52941:8267159] 2 libdispatch.dylib 0x00007fff2024b98c _dispatch_once_callout + 20
2021-08-21 07:08:23.301632+0000 basilisk[52941:8267159] 3 CarbonCore 0x00007fff2285fa72 _Gestalt_SystemVersion + 944
2021-08-21 07:08:23.301639+0000 basilisk[52941:8267159] 4 CarbonCore 0x00007fff2285f688 Gestalt + 149
2021-08-21 07:08:23.301647+0000 basilisk[52941:8267159] 5 XUL 0x00000001047ef815 _cairo_quartz_surface_create_internal + 287
XUL was compiled with optimization - stepping may behave oddly; variables may not be available.
Process 52941 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x7ffe00002007)
frame #0: 0x000000010438edb0 XUL`nsWindowWatcher::OpenWindowInternal(this=0x0000000100210ad0, aParent=0x0000000000000000, aUrl="chrome://browser/content/", aName="_blank", aFeatures="chrome,dialog=no,all", aCalledFromJS=<unavailable>, aDialog=<unavailable>, aNavigate=<unavailable>, aArgv=0x00000001106ede90, aIsPopupSpam=<unavailable>, aForceNoOpener=<unavailable>, aLoadInfo=0x0000000000000000, aResult=0x00007ffe00002007) at nsWindowWatcher.cpp:697:12 [opt]
694 aParent ? nsPIDOMWindowOuter::From(aParent) : nullptr;
695
696 NS_ENSURE_ARG_POINTER(aResult);
-> 697 *aResult = 0;
698
699 if (!nsContentUtils::IsSafeToRunScript()) {
700 nsContentUtils::WarnScriptWasIgnored(nullptr);
Target 0: (basilisk) stopped.

And here is it error that is caused by -O2:

Process 16744 launched: '/Volumes/t1_backup/silver_2/basilisk/obj-x86_64-apple-darwin20.5.0/dist/Silver.app/Contents/MacOS/basilisk' (x86_64)
2021-08-21 08:09:45.134586+0000 basilisk[16744:8419728] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=16744
2021-08-21 08:09:45.134679+0000 basilisk[16744:8419728] SecTaskCopyDebugDescription: basilisk[16744]/0#-1 LF=0
XUL was compiled with optimization - stepping may behave oddly; variables may not be available.
Process 16744 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1000)
frame #0: 0x0000000102741cc4 XUL`SameChildProcessMessageManagerCallback:Big GrinoSendAsyncMessage(JSContext*, nsAString_internal const&, mozilla::dom::ipc::StructuredCloneData&, JS::Handle<JSObject*>, nsIPrincipal*) [inlined] mozilla::LinkedListElement<JS:TongueersistentRooted<void*> >:ConfusedetPreviousUnsafe(this=<unavailable>, aElem=0x0000000100362450) at LinkedList.h:353:24 [opt]
350
351 listElem->mNext = this;
352 listElem->mPrev = this->mPrev;
-> 353 this->mPrev->mNext = listElem;
354 this->mPrev = listElem;
355
356 Traits::enterList(aElem);
Target 0: (basilisk) stopped.
Reply
#6
(08-21-2021, 07:09 AM)noobsoftware Wrote: I get this error with optimization set to: ac_add_options --enable-optimize=-Os
and using the Mojave sdk

Going to be a bit busy this weekend, but I'll take a look at the code soon... but generally speaking it runs fine on Big Sur up to -O1 ... beyond that there are seemingly random crashes. I hadn't figured it out yet... but since the most stable and compatible builds have been done with the El Capitan system and tools I've just been doing that... and was going to try to figure out the rest of it when I did the port for Apple Silicon.  I can try and invest some more time on getting it stable with later build tools, but I've been busy with my own library on iOS and Android. That combined to my other work and family issues.  But I'll try to carve out some time for updating the build environment.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)