Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[[ Prebuilt ]] Build Linux prebuilt libraries with position-independant code#6953

Merged
livecodeali merged 2 commits intodevelopfrom
feature-linux-prebuilt-pic
Apr 24, 2019
Merged

[[ Prebuilt ]] Build Linux prebuilt libraries with position-independant code#6953
livecodeali merged 2 commits intodevelopfrom
feature-linux-prebuilt-pic

Conversation

@livecodeian
Copy link
Copy Markdown
Contributor

This patch enables the -fPIC option when compiling Linux prebuilt libraries, allowing those libraries to be used to create position-independent executables, which is now the default in the version of GCC provided with Ubuntu 18.04.

livecodeian and others added 2 commits April 2, 2019 15:42
…aries

By building the prebuilt libraries with position-independent code, we
enable them to be linked into position-independent executables, which is
now the default for executables built with recent versions of GCC (v6
onwards)
…ision

Make sure the Curl build script generates the correct archive name for OpenSSL with a non-empty buildrevision, otherwise the build will fail.
@runrevmark
Copy link
Copy Markdown
Contributor

@livecode-vulcan review ok 17637ac

@livecode-vulcan
Copy link
Copy Markdown
Contributor

💙 review by @runrevmark ok 17637ac

livecode-vulcan added a commit that referenced this pull request Apr 17, 2019
…-pic

[[ Prebuilt ]] Build Linux prebuilt libraries with position-independant code

This patch enables the `-fPIC` option when compiling Linux prebuilt libraries, allowing those libraries to be used to create position-independent executables, which is now the default in the version of GCC provided with Ubuntu 18.04.
@livecode-vulcan
Copy link
Copy Markdown
Contributor

😞 test failure 17637ac

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: failure
  • try-community-arm64-android-sdk26_ndk16r15: failure
  • try-community-x86-android-sdk26_ndk16r15: failure
  • try-community-x86_64-android-sdk26_ndk16r15: failure
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos12.1: success
  • try-community-universal-ios-iphonesimulator12.1: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: pending

@livecodeali
Copy link
Copy Markdown
Member

@livecode-vulcan retry 17637ac

livecode-vulcan added a commit that referenced this pull request Apr 17, 2019
…-pic

[[ Prebuilt ]] Build Linux prebuilt libraries with position-independant code

This patch enables the `-fPIC` option when compiling Linux prebuilt libraries, allowing those libraries to be used to create position-independent executables, which is now the default in the version of GCC provided with Ubuntu 18.04.
@livecode-vulcan
Copy link
Copy Markdown
Contributor

😞 test failure 17637ac

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: pending
  • try-community-arm64-android-sdk26_ndk16r15: pending
  • try-community-x86-android-sdk26_ndk16r15: pending
  • try-community-x86_64-android-sdk26_ndk16r15: pending
  • try-community-js-emscripten-sdk1.35: pending
  • try-community-universal-ios-iphoneos12.1: success
  • try-community-universal-ios-iphonesimulator12.1: pending
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: pending
  • try-community-x86_64-linux-debian8: pending
  • try-community-x86-win32: failure
  • try-community-x86_64-win32: pending

@livecodeali
Copy link
Copy Markdown
Member

@livecode-vulcan retry 17637ac

livecode-vulcan added a commit that referenced this pull request Apr 17, 2019
…-pic

[[ Prebuilt ]] Build Linux prebuilt libraries with position-independant code

This patch enables the `-fPIC` option when compiling Linux prebuilt libraries, allowing those libraries to be used to create position-independent executables, which is now the default in the version of GCC provided with Ubuntu 18.04.
@livecode-vulcan
Copy link
Copy Markdown
Contributor

😎 test success 17637ac

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: success
  • try-community-arm64-android-sdk26_ndk16r15: success
  • try-community-x86-android-sdk26_ndk16r15: success
  • try-community-x86_64-android-sdk26_ndk16r15: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos12.1: success
  • try-community-universal-ios-iphonesimulator12.1: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: success
  • try-community-x86_64-win32: success

@mwieder
Copy link
Copy Markdown
Contributor

mwieder commented May 10, 2019

I can no longer build from source, as I'm getting linker errors on all the prebuilt libraries of the form

/usr/bin/ld: ../../prebuilt/lib/linux/x86_64/libpcre.a(pcre16_compile.o):
relocation R_X86_64_32S against `.rodata' can not be used when making a PIE
object; recompile with -fPIC

@mwieder
Copy link
Copy Markdown
Contributor

mwieder commented May 11, 2019

Was this actually tested?
By adding my patches from #6897 after this. I'm able to compile the source again.

@montegoulding
Copy link
Copy Markdown
Contributor

@mwieder you could feasibly have some stale thirdparty prebuilts. Try trashing them and rebuilding.

@mwieder
Copy link
Copy Markdown
Contributor

mwieder commented May 12, 2019

Hmmm... "make clean-linux" trashes prebuilt/fetched, prebuilt/include, prebuilt/include, and prebuilt/lib. Is there maybe more work it should be doing?

@mwieder
Copy link
Copy Markdown
Contributor

mwieder commented May 12, 2019

I got rid of everything in prebuilt/packed with the same results.

@montegoulding
Copy link
Copy Markdown
Contributor

OK @livecodeian any thoughts on this?

@livecodeian
Copy link
Copy Markdown
Contributor Author

@mwieder @montegoulding I did a test build at the weekend and got the same results as Mark. Investigating I realised the configuration for building thirdparty prebuilt libs didn't include the -fPIC flag so I've put together a PR that should fix the issue - #7032

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants