VOGONS


Compile SVN in macOS?

Topic actions

Reply 161 of 172, by almeath

User metadata
Rank Member
Rank
Member
emendelson wrote on 2021-03-30, 13:26:

I don't have libz.1.dylib in /usr/lib under Big Sur. In fact, I don't find it anywhere outside applications and my development environment. Maybe something installed it in your /usr/lib ??

It dates back 3 years, so I cannot remember. I just reinstalled zlib via Homebrew and it did not update the files in usr/lib, so it is independent of that installation.

I list zlib as a dependency in my build instructions, and presumed that it was being handled by the brew install. It would appear not.

It seems I will need to look into manually installing it and trying another build.

Or perhaps I could place the dylib inside my app bundle and run install name tool to point libpng to the internal dylib.

I thought dylib bundler would have done that already...

I have attached the listing for zlib under usr/local - all aliases point to libz.1.dylib

Attachments

Reply 162 of 172, by almeath

User metadata
Rank Member
Rank
Member

Hmm, nothing I try with the nametool command is working - the app just won't launch. I might need @Dominus to weigh in again ..

I was trying to run:

install_name_tool -change /usr/lib/libz.1.dylib

with the last part being:

dosbox.app/contents/resources/lib/libpng16.16.dylib

But I am not sure what to put for the middle part:

@loader_path/

Reply 163 of 172, by almeath

User metadata
Rank Member
Rank
Member

On second thoughts.. the whole point of usr/lib is that it is the system and not meant to receive anything installed by the user. You cannot even move or delete anything from that directory. On Catalina and Big Sur it is probably completed locked up not user modifiable in any way even with full admin privileges.

Therefore, am I not right in assuming it has to have been installed by Mojave? If this was something installed by the user in usr/lib, and it was a dependency, then surely dylib bundler would move it across to the bundle?

EDIT : I have just accessed a relative's iMac, totally unrelated to my own. It also runs Mojave. He has never installed brew or messed with the default installation in any way shape or form. We looked under usr/lib and it has the exact same libz files that I showed in the screen cap above. That basically confirms these are standard files included in a Mojave installation. Therefore, there is no need to bring the dylib into the app bundle because libpng will find it in the default installation. I am not sure what happens with Catalina and Big Sur. I will see if I can do an otool check later on when I can access my MacBook Pro with Big Sur.

Reply 164 of 172, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

I have a clean Mojave installation set up in Parallels Desktop, and /usr/lib has the zlib libraries. In my Big Sur system, those libraries aren't there. So presumably Apple used to supply them but now doesn't.

Perhaps a build script could copy the dylib into the bundle ? I don't know if that would work...

Reply 165 of 172, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
emendelson wrote on 2021-03-30, 13:26:

I don't have libz.1.dylib in /usr/lib under Big Sur. In fact, I don't find it anywhere outside applications and my development environment. Maybe something installed it in your /usr/lib ??

The libs in /usr/lib are cached by the system in Big Sur. Another security measurement. So even though these are not really there, they can be used. Something something magic 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 166 of 172, by almeath

User metadata
Rank Member
Rank
Member
Dominus wrote on 2021-03-30, 15:46:

The libs in /usr/lib are cached by the system in Big Sur. Another security measurement. So even though these are not really there, they can be used. Something something magic 😀

Interesting concept. The rapid and deep changes to the long standing operation of the macOS since Catalina, coupled with numerous undocumented under the hood "security" modifications (with unexpected knock-on effects), are the main reason I decided to keep Mojave running for as long as possible. In my opinion, it was less about "security", rather laying the groundwork for Apple's transition to the ARM architecture, which had been the intention all along, regardless of what Apple says.

Back to the original point, it is good the files are still "there", but completely hidden from the user? I do not see how that helps with understanding how the system is functioning or trouble-shooting issues as we have been.

Whinge over.. 😉

Reply 167 of 172, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote on 2021-03-30, 15:46:
emendelson wrote on 2021-03-30, 13:26:

I don't have libz.1.dylib in /usr/lib under Big Sur. In fact, I don't find it anywhere outside applications and my development environment. Maybe something installed it in your /usr/lib ??

The libs in /usr/lib are cached by the system in Big Sur. Another security measurement. So even though these are not really there, they can be used. Something something magic 😀

But libz.1.dylib is not visible in /usr/lib - which seems to mean that it's not available. Or am I misunderstanding what you're saying?

Reply 168 of 172, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

It's magically available to be used. Otherwise everything dynamic linked with stuff in there would break.
You just can't tinker with any of the files anymore. They are alltogether in one big file but I only read briefly about it, details are lost in my brain 😉
I think it's kind of genius 😉

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 169 of 172, by almeath

User metadata
Rank Member
Rank
Member

I ran ./configure in Big Sur and it shows that the zlib headers are detected and usable by the DOSBox build script just as in Mojave, but there is no sign of the actual dylib anywhere on the drive.

However, when I ran otool on libpng16.16.dylib, it points to:

/usr/lib/libz.1.dylib
/usr/lib/libSystem.B.dylib

Reply 170 of 172, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of […]
Show full quote

New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic
linker cache of all system-provided libraries. As part of this change,
copies of dynamic libraries are no longer present on the filesystem.
Code that attempts to check for dynamic library presence by looking for a
file at a path or enumerating a directory will fail. Instead, check for
library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)

And the in depth reply at the bottom of https://developer.apple.com/forums/thread/655588

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper