halley icon indicating copy to clipboard operation
halley copied to clipboard

libvorbis contains a main function

Open 9chu opened this issue 6 years ago • 3 comments

src/contrib/libvorbis/lib/barkmel.c contains an int main entry that should be removed.

9chu avatar Feb 26 '19 07:02 9chu

Better report this upstream, perhaps at https://github.com/xiph/vorbis ?

However, I don't think that this is an error. libvorbis contains three utility / extra programs: barkmel, tone and psytune, see https://github.com/xiph/vorbis/blob/ea8b03fce93444cb3cf0131909e15b4f8856e863/lib/Makefile.am#L29 So the corresponding c-files should have an int main.

gurka avatar Feb 26 '19 17:02 gurka

Better report this upstream, perhaps at https://github.com/xiph/vorbis ?

However, I don't think that this is an error. libvorbis contains three utility / extra programs: barkmel, tone and psytune, see https://github.com/xiph/vorbis/blob/ea8b03fce93444cb3cf0131909e15b4f8856e863/lib/Makefile.am#L29 So the corresponding c-files should have an int main.

Yes, it's an utility program. So the real question is that the CMakeLists.txt is not supposed to include it.

In src/engine/audio/CMakeLists.txt:

file (GLOB_RECURSE VORBIS_FILES "../../contrib/libvorbis/*.c")

That may lead to a link problem.

9chu avatar Feb 27 '19 01:02 9chu

Aha, yes that is a problem. I wonder why they don't just add the libvorbis directory with add_subdirectory. libvorbis uses CMake as well, so it should be possible.

gurka avatar Feb 27 '19 12:02 gurka