zmanda / amanda

Amanda Network Backup
https://www.zmanda.com/downloads/
Other
228 stars 108 forks source link

multiple definition of tu_debugging_enabled #184

Open burmancomp opened 2 years ago

burmancomp commented 2 years ago

System: Debian 11 (64-bit) Amanda version: 3.5.2 GCC version: 10

Steps to reproduce:

./autogen ./configure make

Resulting make failing with:

/usr/bin/ld: ./.libs/libtestutils.a(testutils.o):/home/user/amanda-tag-communit y-3.5.2/common-src/testutils.h:78: multiple definition of `tu_debugging_enabled' ; amflock-test.o:/home/user/amanda-tag-community-3.5.2/common-src/testutils.h:7 8: first defined here
collect2: error: ld returned 1 exit status

GCC behavior has changed in version 10. See for example: https://stackoverflow.com/questions/69908418/multiple-definition-of-first-defined-here-on-gcc-10-2-1-but-not-gcc-8-3-0

stefangweichinger commented 2 years ago

hitting that one as well

megamoose commented 2 years ago

Have the same problem, so I looked at whether I could fix it.

It turns out that it was fixed in the master branch a long time ago: https://github.com/zmanda/amanda/blob/6fc364280b0aa5dbfe45fe7448c33d5234611788/common-src/testutils.h#L78

If using that is not an option, you can make the same change to the 3.5.2 version of common-src/testutils.h and it will work.