Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlopen Objective-C runtime before fork(2) #253

Merged
merged 1 commit into from
Nov 16, 2024
Merged

dlopen Objective-C runtime before fork(2) #253

merged 1 commit into from
Nov 16, 2024

Conversation

skaji
Copy link
Owner

@skaji skaji commented Nov 16, 2024

It seems that #248 does not fix #246.
Actually I failed to execute cpm on macos 13.7.1 with /usr/bin/perl in github action (macos-13).

So we reverted to the previous fix #247.

@skaji skaji merged commit c684f99 into main Nov 16, 2024
22 checks passed
@skaji skaji deleted the darwin branch November 16, 2024 06:59
@nathanweeks
Copy link

Looks like the issue this was meant to address is still present?

% cpm --version
cpm 0.997019 (/Users/macosuser/bin/cpm)
This is a self-contained version, 0.997019 (https://github.com/skaji/cpm/tree/0.997019)
perl version v5.34.1 (perl)
...
% cpm install JSON
objc[54181]: +[NSString initialize] may have been in progress in another thread when fork() was called.
objc[54181]: +[NSString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
Use of uninitialized value in string eq at /Users/macosuser/bin/cpm line 331.
Use of uninitialized value in concatenation (.) or string at /Users/macosuser/bin/cpm line 331.
Missing task that has uid= at /Users/macosuser/bin/cpm line 331.

@skaji
Copy link
Owner Author

skaji commented Nov 24, 2024

Can you provide the whole output of cpm --version ?

@skaji
Copy link
Owner Author

skaji commented Nov 24, 2024

And also can you provide

sw_vers
uname -m

?

@nathanweeks
Copy link

nathanweeks commented Nov 24, 2024

% sw_vers
ProductName:		macOS
ProductVersion:		14.7.1
BuildVersion:		23H222
% uname -m
arm64
% cpm --version
cpm 0.997019 (/Users/macosuser/bin/cpm)
This is a self-contained version, 0.997019 (https://github.com/skaji/cpm/tree/0.997019)
perl version v5.34.1 (perl)

  %Config:
    archname=darwin-thread-multi-2level
    installsitelib=/Library/Perl/5.34
    installsitebin=/usr/local/bin
    installman1dir=/usr/share/man/man1
    installman3dir=/usr/share/man/man3
    sitearchexp=/Library/Perl/5.34/darwin-thread-multi-2level
    sitelibexp=/Library/Perl/5.34
    vendorarch=/Network/Library/Perl/5.34/darwin-thread-multi-2level
    vendorlibexp=/Network/Library/Perl/5.34
    archlibexp=/System/Library/Perl/5.34/darwin-thread-multi-2level
    privlibexp=/System/Library/Perl/5.34
  %ENV:
  @INC:
    FatPacked::5050121048=HASH(0x12d02bb58)
    /Library/Perl/5.34/darwin-thread-multi-2level
    /Library/Perl/5.34
    /Network/Library/Perl/5.34/darwin-thread-multi-2level
    /Network/Library/Perl/5.34
    /Library/Perl/Updates/5.34.1
    /System/Library/Perl/5.34/darwin-thread-multi-2level
    /System/Library/Perl/5.34
    /System/Library/Perl/Extras/5.34/darwin-thread-multi-2level
    /System/Library/Perl/Extras/5.34

@skaji
Copy link
Owner Author

skaji commented Nov 24, 2024

Thank you.

perl version v5.34.1 (perl)

So, it seems that $^X is perl, not /usr/bin/perl.
This case was not anticipated.

@skaji
Copy link
Owner Author

skaji commented Nov 24, 2024

@nathanweeks Can you try "patch-fatpack" branch?

curl -fsSL https://raw.githubusercontent.com/skaji/cpm/patch-fatpack/cpm > cpm
perl cpm --version
perl cpm install JSON

@nathanweeks
Copy link

That version works!

% curl -fsSL https://raw.githubusercontent.com/skaji/cpm/patch-fatpack/cpm > cpm
1 distribution installed.
% perl cpm --version
cpm 0.997019 (cpm)
This is a self-contained version, 0.997019-3-g5a08785 (https://github.com/skaji/cpm/tree/5a08785)
perl version v5.34.1 (perl)

  %Config:
    archname=darwin-thread-multi-2level
    installsitelib=/Library/Perl/5.34
    installsitebin=/usr/local/bin
    installman1dir=/usr/share/man/man1
    installman3dir=/usr/share/man/man3
    sitearchexp=/Library/Perl/5.34/darwin-thread-multi-2level
    sitelibexp=/Library/Perl/5.34
    vendorarch=/Network/Library/Perl/5.34/darwin-thread-multi-2level
    vendorlibexp=/Network/Library/Perl/5.34
    archlibexp=/System/Library/Perl/5.34/darwin-thread-multi-2level
    privlibexp=/System/Library/Perl/5.34
  %ENV:
  @INC:
    FatPacked::5259836248=HASH(0x13982bb58)
    /Library/Perl/5.34/darwin-thread-multi-2level
    /Library/Perl/5.34
    /Network/Library/Perl/5.34/darwin-thread-multi-2level
    /Network/Library/Perl/5.34
    /Library/Perl/Updates/5.34.1
    /System/Library/Perl/5.34/darwin-thread-multi-2level
    /System/Library/Perl/5.34
    /System/Library/Perl/Extras/5.34/darwin-thread-multi-2level
    /System/Library/Perl/Extras/5.34
% perl cpm install JSON
DONE install JSON-4.10 (using prebuilt)
1 distribution installed.

@skaji
Copy link
Owner Author

skaji commented Nov 24, 2024

Fixed in https://metacpan.org/release/SKAJI/App-cpm-0.997020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NSString initialize] may have been in progress in another thread when fork() was called
2 participants