Skip to content

OpenBSD build issues #229

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

Closed
jkusniar opened this issue Nov 4, 2016 · 11 comments
Closed

OpenBSD build issues #229

jkusniar opened this issue Nov 4, 2016 · 11 comments

Comments

@jkusniar
Copy link

jkusniar commented Nov 4, 2016

When building static library on OpenBSD current, amd64:

[ 96%] Built target libui-temporary
[ 98%] Removing hidden symbols
objcopy: unrecognized option `--localize-hidden'
Usage: objcopy [option(s)] in-file [out-file]
 Copies a binary file, possibly transforming it in the process
 The options are:
...

Seems like OpenBSD has old version of objcopy. Removing option --localize-hidden from unix/CMakeLists.txt fixes it.

@jkusniar
Copy link
Author

jkusniar commented Nov 4, 2016

see #230

@andlabs
Copy link
Owner

andlabs commented Nov 4, 2016

The --localize-hidden is significant: it's the whole reason for all that complicated gobbledygook. The idea is that only the public libui API should link with the rest of the program. I want to avoid a multiple-definition error in the case that you define a function called, say, shouldQuit(). Is there some other way?

@jkusniar
Copy link
Author

jkusniar commented Nov 4, 2016

Don't know. This was just quick and dirty fix to get it running. Will try to find out what can by done on OpenBSD.

@jkusniar
Copy link
Author

jkusniar commented Nov 7, 2016

not supported by openbsd's version :-(

@jkusniar jkusniar closed this as completed Nov 7, 2016
@andlabs
Copy link
Owner

andlabs commented Nov 7, 2016

Then there needs to be a replacement.

@andlabs andlabs reopened this Nov 7, 2016
@computerquip
Copy link

computerquip commented Nov 19, 2016

Not sure how practical this is but the point of that argument is to localize hidden symbols. OpenBSD's version may not allow a convenient argument like that but it does allow you to specify each symbol via --localize-symbols=<filename> or --localize-symbol=<symbolname> per this manual page: http://man.openbsd.org/OpenBSD-current/man1/objcopy.1

@computerquip
Copy link

Also, without looking at any of the code, does declaring a function static not suffice in this case?

@andlabs
Copy link
Owner

andlabs commented Nov 19, 2016

No, because static would limit the function to that single file; I need to share functions across multiple files without exporting them.

It'd be great if I could autogenerate such a symbols list from the toplevel .h files...

@DemiMarie
Copy link

@andlabs A program using libclang might be up to the task.

@cody271 cody271 mentioned this issue Mar 21, 2018
@andlabs
Copy link
Owner

andlabs commented Mar 23, 2018

I'm going to add uipriv to any private function instead, so I can get rid of any and all static library hacks.

@andlabs
Copy link
Owner

andlabs commented Mar 23, 2018

Replaced with #308.

@andlabs andlabs closed this as completed Mar 23, 2018
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

4 participants