Re: Fink for Ventura / Xcode 15?
Hanspeter Niederstrasser <[email protected]>
| Newsgroups | gmane.os.apple.fink.general |
|---|---|
| Organization | Snaggled Works |
| Message-ID | <[email protected]> |
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 _______________________________________________ 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
no-read-only-stubs.patch
(text/plain, 2.3 KB)
diff --git a/10.9-libcxx/dpkg-bootstrap.info b/10.9-libcxx/dpkg-bootstrap.info
index 6abec825..15ccf5f5 100644
--- a/10.9-libcxx/dpkg-bootstrap.info
+++ b/10.9-libcxx/dpkg-bootstrap.info
@@ -11,7 +11,7 @@ SourceDirectory: dpkg-%v
UpdateConfigGuessInDirs: build-aux
PatchFile: dpkg.patch
-PatchFile-MD5: 9fb88eddbf7d830c448eb7771642bb3a
+PatchFile-MD5: 82f5c581d07a327c4bbd3ca1c7a39f28
PatchScript: <<
sed -e 's,@FINKPREFIX@,%p,g' -e 's,@ARCHITECTURE@,%m,g' %{PatchFile} | patch -p1
@@ -109,7 +109,7 @@ perl -pi -e "s,GNU patch,patch,g" configure
SetCFLAGS: -g -O2 -fstack-protector -Wformat -fPIE -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-align -Wno-format-security
SetCPPFLAGS: -D_FORTIFY_SOURCE=2
SetCXXFLAGS: -g -O2 -fstack-protector -Wformat -fPIE
-SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
+SetLDFLAGS: -Wl,-bind_at_load -fPIE -Wl,-pie
# Use %P for all state and admindirs for pre fink build
ConfigureParams: <<
diff --git a/10.9-libcxx/dpkg.info b/10.9-libcxx/dpkg.info
index 85c18a0c..a5eb9c33 100644
--- a/10.9-libcxx/dpkg.info
+++ b/10.9-libcxx/dpkg.info
@@ -39,7 +39,7 @@ SourceDirectory: dpkg-%v
UpdateConfigGuessInDirs: build-aux
PatchFile: dpkg.patch
-PatchFile-MD5: 9fb88eddbf7d830c448eb7771642bb3a
+PatchFile-MD5: 82f5c581d07a327c4bbd3ca1c7a39f28
PatchScript: <<
sed -e 's,@FINKPREFIX@,%p,g' -e 's,@ARCHITECTURE@,%m,g' %{PatchFile} | patch -p1
@@ -141,7 +141,7 @@ perl -pi -e "s,-q '[\^]GNU patch,-qE '^\(GNU \)\?patch,g" configure
SetCFLAGS: -g -O2 -fstack-protector -Wformat -fPIE -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-align -Wno-format-security
SetCPPFLAGS: -D_FORTIFY_SOURCE=2
SetCXXFLAGS: -g -O2 -fstack-protector -Wformat -fPIE
-SetLDFLAGS: -Wl,-read_only_stubs -Wl,-bind_at_load -fPIE -Wl,-pie
+SetLDFLAGS: -Wl,-bind_at_load -fPIE -Wl,-pie
ConfigureParams: <<
--with-finkvirtuals=%p/bin/fink-virtual-pkgs \
diff --git a/10.9-libcxx/dpkg.patch b/10.9-libcxx/dpkg.patch
index a3e9ea08..2acebbf8 100644
--- a/10.9-libcxx/dpkg.patch
+++ b/10.9-libcxx/dpkg.patch
@@ -17,7 +17,7 @@ diff -ruN dpkg-1.19.7.orig/fink/buildflags.conf dpkg-1.19.7/fink/buildflags.conf
+APPEND LDFLAGS -fPIE -Wl,-pie
+
+# debian relro
-+APPEND LDFLAGS -Wl,-read_only_stubs
++# APPEND LDFLAGS -Wl,-read_only_stubs
+
+# debian bindnow
+APPEND LDFLAGS -Wl,-bind_at_load