Skip to content

Conversation

ao2
Copy link

@ao2 ao2 commented May 17, 2020

Hi Aaron,

here are some misc build fixes, they started from a lintian issue but then I also noticed some other minor things when enabling options.

Ciao, Antonio

ao2 added 4 commits May 17, 2020 23:48
The main() function is expected to be a global function, the code won't
link as a standalone executable if main() is put into a namespace.

This fixes the following linking error:

-----------------------------------------------------------------------
[ 32%] Linking CXX executable ../../../bin/test_sparse_array
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x20): undefined reference to `main'
-----------------------------------------------------------------------
Split executable modules from the library object, in particular this is
to prevent the exit() symbol to become part of the library, as this may
raise some flags in linting tools like "lintian" from Debian, e.g.:

X: libgrokj2k1: shlib-calls-exit usr/lib/x86_64-linux-gnu/libgrokj2k.so.7.1.0

Still keep executable sources grouped in a new GROK_EXECUTABLES_SRCS
variable to be able to run cppcheck on all of them.
@boxerab
Copy link
Collaborator

boxerab commented May 18, 2020

Thanks, Antonio!

@boxerab boxerab merged commit fa5f974 into GrokImageCompression:master May 18, 2020
@ao2 ao2 deleted the avoid-exit-symbol-in-library branch May 24, 2020 21:44
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.

2 participants