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

Question: SHA* symbols being linked into libmysqlclient.a #10

Open
treeswift opened this issue Dec 10, 2021 · 23 comments
Open

Question: SHA* symbols being linked into libmysqlclient.a #10

treeswift opened this issue Dec 10, 2021 · 23 comments

Comments

@treeswift
Copy link

Qt build logs (the issue isn't specific to Qt, it's just the first dependent component to encounter it):

lld-link: error: duplicate symbol: SHA224
>>> defined at libmysqlclient.a(my_sha2.cc.obj)
>>> defined at libcrypto.a(sha256.o)

lld-link: error: duplicate symbol: SHA256
>>> defined at libmysqlclient.a(my_sha2.cc.obj)
>>> defined at libcrypto.a(sha256.o)

lld-link: error: duplicate symbol: SHA384
>>> defined at libmysqlclient.a(my_sha2.cc.obj)
>>> defined at libcrypto.a(sha512.o)

lld-link: error: duplicate symbol: SHA512
>>> defined at libmysqlclient.a(my_sha2.cc.obj)
>>> defined at libcrypto.a(sha512.o)

libcrypto.a is a provided by openssl, which is also a dependency of libmysqlclient.

  • The obvious pedantic solution would be to move these symbols out of libmysqlclient, amending its dependents if necessary (and if MXE pkg-config has the notion of transitive library dependencies, no amendment will be needed at all).
  • A less pedantic solution would be to allow duplicate symbols, but it's another client tweak, and if I have to tweak client packages anyway, I'd rather tweak them the right way.

IOW, the first option is my preference. Objections?

@treeswift
Copy link
Author

P.S. Right now only qtbase and gdal use libmysqlclient directly.

@treeswift
Copy link
Author

Further looked into it. libmysqlclent builds its own hash implementations. I could move them out of the way by namespacing them or linking libmysqlclient as a DLL rather than statically. (Namespacing is a more local solution; shared linkage, OTOH, would allow us update the mysql revision without rebuilding all the way up.)

@treeswift
Copy link
Author

'k, mysqlclient checks for defined(HAVE_OPENSSL), will simply set it.

@treeswift
Copy link
Author

Rebuilding w/ -DWITH_SSL=system in libmysqlclient.mk, stay tuned.

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

I don't see why mysqlclient is needed TBH... I don't use it in my builds. Does it add more features?

@treeswift
Copy link
Author

Check qtbase.mk.
Qt links to a number of database connectors, including MySQL. It's a big umbrella framework. Its advantage, but also its weakness, at times. Many apps can, and do, depend on Qt and nothing else at all, rendering it an important goalpost for me personally.
If we are aiming for a complete distro, I'd rather not strip features unless they come at too large a cost (disk space, effort, or regulatory -- IOW, licensing).

@treeswift
Copy link
Author

I am personally aiming for a complete distro. (Suggest a name!)

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Linux?

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Or just in general?

@treeswift
Copy link
Author

treeswift commented Dec 10, 2021

Linux?

The WinRT kernel is still WinRT kernel, so technically, it's Windows RT (in the same sense both GNU/Linux and Android are Linux).
But application-wise, I want to be able to run everything there is on an average e.g. Ubuntu distro (except kernel modules) on a stock ARM/Tegra Surface RT (32 Gb or 64 Gb) or Surface 2. Basically, make it a usable tablet/mini-laptop.
I already booked a few beta testers (friends' kids).
Going to be the cheapest ARM PC worldwide, until supplies last.)

@treeswift
Copy link
Author

("Project 9600" might be a cool name, I just need to check whether MSFT trademarks their build numbers.)

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Ah, I see. I was asking about Linux cause I've wanted to make my own distro for the RT devices. Makes sense, though.

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Oh yeah, if MSFT doesn't trademark then Project 9600 sounds like a good name but what about Win10? Would it be a kinda mix? 😂 Project 9600/15035

@treeswift
Copy link
Author

9600 stays the minimum supported version either way. Unless e.g. we find a feature in DX12 that can't be backported to DX11 and that's critical enough to warrant two separate flavors (rather than a runtime-detected flag in a graphic app).
But anyway. Flat Whale? Eclectic Ray? Any other pun on the "surface" theme without using the word "surface"?

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Trying to think of some, not very easy. At school, could ask friends 😂😂😂

@treeswift
Copy link
Author

treeswift commented Dec 10, 2021

"Rita" (the Russian for "Margaret")? (almost kidding)

Or "ReTouche" (French/international).

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Rita doesn't actually sound bad, neither does ReTouche. I would go for Rita if it was a choosing thing though.

@treeswift
Copy link
Author

Accepted!

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Glad to hear. Quick question though, do you wanna put stuff for it on my website when everything is going? Space isn't a real concern, just gotta stay under 300GB IIRC. My domain is pahaze.net, I could make a subdomain for it called rita.pahaze.net or something similar.

@treeswift
Copy link
Author

I was thinking of ordering a standalone hosting/domain (was comparing hosting providers) but we can start with rita.pahaze.net to iron everything out (the directory structure, the package manager, the scripts...).
There can't be too many mirrors anyway. Can only be too few.

I'd define a milestone -- when I'd want a 2nd level domain -- as "there is a DVD worth of packages that an average user won't be disappointed to install offline".

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Alright, I'll get it set up later. Any files uploaded to it need sent to me ATM just cause hosting is done by my friend and I don't know whether he would like other people connecting to his server. Also, if needbe, my domain can be a permanent secondary mirror/backup (since a lot of mirrors are just taken down after time) whenever a second domain is made for it

@treeswift
Copy link
Author

I think I'd debug the scripts on localhost then and get some cheap $3/mo hosting just so as not to bother anyone.
(Honestly, automated repo upload would be the first feature I'd want from such a server.)

@pahaze
Copy link
Member

pahaze commented Dec 10, 2021

Makes sense. I'll still make it a subdomain for mirroring and such, though. Like said... never too many of em.

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

No branches or pull requests

2 participants