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

thirdparty/luasec 0.9 #1005

Merged
merged 7 commits into from Feb 22, 2020
Merged

thirdparty/luasec 0.9 #1005

merged 7 commits into from Feb 22, 2020

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Oct 31, 2019

@NiLuJe
Copy link
Member

NiLuJe commented Nov 15, 2019

Any idea what went kablooey here?

@Frenzie
Copy link
Member Author

Frenzie commented Nov 15, 2019

Not really, it seemed to work locally but I haven't looked into it besides not merging due to the failure.

@NiLuJe
Copy link
Member

NiLuJe commented Nov 15, 2019

Could it be related to the luarocks tweaks? (That vaguely seems to match, timing-wise).

@Frenzie
Copy link
Member Author

Frenzie commented Nov 15, 2019

You mean #1003? I don't think so but it's something to consider once I/someone looks into it. 👍

@NiLuJe
Copy link
Member

NiLuJe commented Nov 15, 2019

Yep. Is the CI happy after a rebase and a rebuild, for instance?

@Frenzie
Copy link
Member Author

Frenzie commented Nov 15, 2019

Only takes seconds to try, so let's give it a go.

@Frenzie
Copy link
Member Author

Frenzie commented Nov 15, 2019

Meh, I guess I'll have to run the build in a local Docker container to see what goes wrong. But once again, if I make the change locally (plus emptying out base/build) it works just fine if I run kodev test base common_spec.lua.

@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

Alright, I finally had some time to look into this and I think it's most likely lunarmodules/luasec@8ef33e3 (and possibly a couple of related commits). Fingers crossed.

@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

Hm, guess I did something wrong there.

[----------] Running tests from ./spec/base/unit/common_spec.lua
common/ssl.lua:8: error loading module 'ssl.core' from file 'common/ssl.so':
	libssl.so.1.1: cannot open shared object file: No such file or directory

@NiLuJe
Copy link
Member

NiLuJe commented Feb 22, 2020

Hmm, we are using openssl 1.1.1, not 1.1.0?

@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

You're quite right of course.

So then wtf is going wrong here, lol

@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

Okay, let's see… this is the 0.9 if I'm not mistaken:

$ readelf -d ssl.so

Dynamic section at offset 0xfe00 contains 26 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libssl.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0x6000
 0x000000000000000d (FINI)               0xce14
 0x0000000000000019 (INIT_ARRAY)         0x10df0
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x10df8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x260
 0x0000000000000005 (STRTAB)             0x1fa0
 0x0000000000000006 (SYMTAB)             0x530
 0x000000000000000a (STRSZ)              4489 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x11000
 0x0000000000000002 (PLTRELSZ)           6000 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x45b0
 0x0000000000000007 (RELA)               0x33e0
 0x0000000000000008 (RELASZ)             4560 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x3360
 0x000000006fffffff (VERNEEDNUM)         3
 0x000000006ffffff0 (VERSYM)             0x312a
 0x000000006ffffff9 (RELACOUNT)          185
 0x0000000000000000 (NULL)               0x0

@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

Yeah, no real difference with the 0.8.2 version…

$ readelf -d ssl.so

Dynamic section at offset 0xfdf0 contains 27 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libssl.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../libs]
 0x000000000000000c (INIT)               0x6000
 0x000000000000000d (FINI)               0xcca0
 0x0000000000000019 (INIT_ARRAY)         0x10de0
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x10de8
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x260
 0x0000000000000005 (STRTAB)             0x1f88
 0x0000000000000006 (SYMTAB)             0x530
 0x000000000000000a (STRSZ)              4488 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x11000
 0x0000000000000002 (PLTRELSZ)           5976 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x4478
 0x0000000000000007 (RELA)               0x33c8
 0x0000000000000008 (RELASZ)             4272 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x3348
 0x000000006fffffff (VERNEEDNUM)         3
 0x000000006ffffff0 (VERSYM)             0x3110
 0x000000006ffffff9 (RELACOUNT)          173
 0x0000000000000000 (NULL)               0x0

@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

Except that 0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN/../libs] seems to be missing… hmm, what's that.

@NiLuJe
Copy link
Member

NiLuJe commented Feb 22, 2020

Oh, right, that makes sense ;).

And that LD override was... weird, yeah.

You'll probably still need the ORIGIN_CMAKE_TO_AUTOCFG crap, though? (c.f., PNG_LIB for instance).

You'll also need the matching LDFLAGS="\${LDFLAGS}\" override in the make call in our CMakeLists ;).
EDIT: Oh, it's already there, I'd missed it ;).

…nt upstream change

Revert "now try LDFLAGS"

This reverts commit 74dc9a6.
@Frenzie
Copy link
Member Author

Frenzie commented Feb 22, 2020

Anyway, it's caused by lunarmodules/luasec@57f2f13 so that change from LD to CCLD is sufficient to make it work just as it always has.

@Frenzie Frenzie merged commit 6a88ab4 into koreader:master Feb 22, 2020
@Frenzie Frenzie deleted the luasec-0.9 branch February 22, 2020 20:12
Frenzie added a commit to Frenzie/koreader that referenced this pull request Feb 22, 2020
* Definitively disable HW dithering on Kindle koreader/koreader-base#1051
  Closes <koreader#5884>.
* thirdparty/luasec 0.9 koreader/koreader-base#1005
Frenzie added a commit to koreader/koreader that referenced this pull request Feb 22, 2020
* Definitively disable HW dithering on Kindle koreader/koreader-base#1051
  Closes <#5884>.
* thirdparty/luasec 0.9 koreader/koreader-base#1005
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
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.

None yet

2 participants