[[ Prebuilt ]] Ensure linux thirdparty libs are prebuilt with position-independent code#7032
Conversation
|
@livecode-vulcan review ok 8629f0a |
|
💙 review by @montegoulding ok 8629f0a |
…party-PIC [[ Prebuilt ]] Ensure linux thirdparty libs are prebuilt with position-independent code This patch modifies the Linux configuration settings so all static libraries are compiled using the `fPIC` gcc flag. This ensures the thirdparty prebuilt libraries can be used by toolchains that produce position-independent executables by default.
|
😞 test failure 8629f0a
|
|
We probably shouldn't merge this until we build prebuilts against a branch of this + updated thirdparty submodule |
|
Yes, this appears to be failing because the prebuilt libraries aren't built yet: curl: (22) The requested URL returned error: 400 Bad Request |
…n-independent code
8629f0a to
af5c40b
Compare
|
@livecode-vulcan review ok af5c40b |
|
💙 review by @livecodeali ok af5c40b |
…party-PIC [[ Prebuilt ]] Ensure linux thirdparty libs are prebuilt with position-independent code This patch modifies the Linux configuration settings so all static libraries are compiled using the `fPIC` gcc flag. This ensures the thirdparty prebuilt libraries can be used by toolchains that produce position-independent executables by default.
|
😞 test failure af5c40b
|
|
Odd... it looks as though the Windows thirdparty prebuilts didn't suffix with PIC |
|
Can I humbly suggest that we just merge in my (currently closed) PR #6897 for now so that linux compilations can just work and I don't have to merge that branch locally every compile time? And then replace it with Ian's patch when we're ready for it? |
|
@mwieder I explained in my original comment why we can't just merge your patch and that reason still stands - it will break compilation on our Linux builders. This patch once sorted out will fix the issue so please have patience. |
|
@livecodeali @livecodeian the issue is |
|
@livecodeian Ah, you're right - I'd forgotten about that. I'm looking forward to us building on a modern linux distro some day. |
af5c40b to
c010244
Compare
|
@livecode-vulcan review ok c010244 |
|
💙 review by @livecodeali ok c010244 |
…party-PIC [[ Prebuilt ]] Ensure linux thirdparty libs are prebuilt with position-independent code This patch modifies the Linux configuration settings so all static libraries are compiled using the `fPIC` gcc flag. This ensures the thirdparty prebuilt libraries can be used by toolchains that produce position-independent executables by default.
|
😎 test success c010244
|
|
I can build from source now, but now I get a crash on attempting to launch. [2387] MCU_library_load /home/mwieder/livecode/linux-x86_64-bin/dbsqlite -> /home/mwieder/livecode/linux-x86_64-bin/dbsqlite The top of my git log is |
|
@mwieder is your thirdparty submodule stale? |
|
dunno. I did a make clean-linux before building, as always. And git-pulled all the submodules. |
|
@mwieder ok, any chance you can run it under gdb and give us a backtrace? |
|
Here's 24 lines of backtrace... that looks pretty specific... do you need more? #0 0x00007ffff67c7e97 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 fffffa558: 0) at ../../revdb/src/sqlite_connection.cpp:189 #20 0x0000555555756626 in MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) (this=0x55555815ee40, htype=HT_MIN, message=0x55555817c150, params=0x55555831da00, passing_object=0x0) |
|
Interesting... will need to discuss with the team. It looks like |
|
Let me know if you need anything further from me on this... I'm leaving town tomorrow for about three weeks. |
|
Still the same after pulling and rebuilding. Here's the end of the strace log: stat("/home/mwieder/livecode/linux-x86_64-bin/sqlite.db", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 |
|
@mwieder I think @livecodefraser found a workaround for this recently. It's due to an ABI difference between our build server and your build machine. Try adding the following to the |
|
PS if ^ works either push up a PR for it or I will if you let me know. |
|
Done. #7127 |
This patch modifies the Linux configuration settings so all static libraries are compiled using the
fPICgcc flag. This ensures the thirdparty prebuilt libraries can be used by toolchains that produce position-independent executables by default.