lhmouse / MINGW-packages

Package scripts for GCC with the MCF thread model
https://gcc-mcf.lhmouse.com/
BSD 3-Clause "New" or "Revised" License
12 stars 1 forks source link

Undefined reference to timersub while compiling darknet #10

Closed Bosi1024 closed 2 years ago

Bosi1024 commented 2 years ago

Hi again,

I'm trying to compile darknet which gives an undefined reference to timersub while linking at the end.

mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\darknet.dir/objects.a(classifier.c.obj):classifier.c:(.text+0x572c): undefined reference to 'timersub'

If this is an upstream issue I will gladly report it upstream.

Kind regards

lhmouse commented 2 years ago

Where does timersub come from? I couldn't find this thing in mingw-w64 so I suspect it's defined by Darknet itself?

Looks like this is a function on Linux,. However mingw-w64 apparently doesn't provide it, so if code uses it then it's almost always due to misconfiguration.

Bosi1024 commented 2 years ago

That seems to be the case. I'll take this issue to the Darknet developers.