Re: Fink for Ventura / Xcode 15?

Scott Hannahs via Fink-users <[email protected]>
Newsgroups gmane.os.apple.fink.general
Message-ID <[email protected]>
Hanspeter,

I think the lz4 utility also needs a similar patch.

sudo -u fink-bld [ENV] sh -c /tmp/fink.TEneP
make PREFIX=/opt/sw DESTDIR=/opt/sw/src/fink.build/root-lz4-1.8.3-1
compiling static library
compiling dynamic library 1.8.3
ld: unknown options: -read_only_stubs 
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [liblz4.1.8.3.dylib] Error 1
make: *** [lib-release] Error 2
### execution of make failed, exit code 2

These are just the ones that I am triggering.  If I grep the .info files I get the following other packages that may have this issue.

% grep -r  read_only_stubs /opt/sw/fink/dists/stable/main/finkinfo
/opt/sw/fink/dists/stable/main/finkinfo/net/whois.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie -liconv
/opt/sw/fink/dists/stable/main/finkinfo/net/openvpn.info:SetLDFLAGS: -fPIE -Wl,-pie -Wl,-read_only_stubs -Wl,-bind_at_load
/opt/sw/fink/dists/stable/main/finkinfo/net/socat.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/web/lynx-cur.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/web/nginx.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/web/netrik.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/editors/nano.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/editors/ldapvi.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/editors/joe.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/libs/lz4.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load
/opt/sw/fink/dists/stable/main/finkinfo/libs/lzo2.info:SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
/opt/sw/fink/dists/stable/main/finkinfo/sound/mikmod.info:#SetLDFLAGS: -Wl,-read_only_stubs
/opt/sw/fink/dists/stable/main/finkinfo/sound/libmikmod3.info:#SetLDFLAGS: -Wl,-read_only_stubs
% 


-Scott




> On Sep 24, 2023, at 7:26 AM, Hanspeter Niederstrasser <[email protected]> wrote:
> 
> On 9/23/23 5:27 PM, Scott Hannahs via Fink-users wrote:
>>> On Sep 23, 2023, at 4:43 PM, Hanspeter Niederstrasser <[email protected]> wrote:
>>> 
>>> You want a part earlier in config.log. Search for the string "checking whether the C compiler works" and then read down for the actual error that led configure to declare "C compiler cannot create executables".
>>> 
>>> Also, there's been a couple updates to deal with macOS 13.6 and 12.7 in git, so make sure you have git checkout that's up to date (via git pull).
>>> 
>>> Hanspeter
>>> 
>>> -- 
>>> Ad Astra
>> Thanks, didn’t see that.  So one of the ld options is no longer valid?
>> configure:3435: checking whether the C compiler works
>> configure:3457: gcc -g -O2 -fstack-protector -Wformat -fPIE -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-align -Wno-format-security -D_FORTIFY_SOURCE=2 -I/opt/sw/boots
>> trap/include -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie -L/opt/sw/bootstrap/lib/0 -L/opt/sw/bootstrap/lib -Wl,-headerpad_max_install_names conftest.c >&5
>> ld: unknown options: -read_only_stubs
>> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>> configure:3461: $? = 1
>> configure:3499: result: no
>> That option is in the man page.
>> -read_only_stubs
>>              [i386 only] Makes the __IMPORT segment of a final linked images read-only.  This option makes a program slightly more secure in that the JMP instructions in the i386 fast
>>              stubs cannot be easily overwritten by malicious code.  The downside is the dyld must use mprotect() to temporarily make the segment writable while it is binding the stubs.
>> And this is building on an Intel system that “arch” says is i386.
> 
> Can you apply the attached patch from the directory where you run ./bootstrap ?
> 
> `patch -p1 /path/to/patchfile`
> 
> This gets rid of the now problematic -read_only_stubs flag. Once applied, run `./bootstrap` again.
> 
> Hanspeter
> <no-read-only-stubs.patch>

_______________________________________________
Fink-users mailing list
[email protected]
List archive:
https://sourceforge.net/p/fink/mailman/fink-users/
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.