cpdup: not 64-bit clean
cpdup cannot be built on 64-bit Linux (probably not on 64-bit DragonFly either,
once that becomes available).
Build log attached (using Fedora 9, GCC 4.3. Same problem occurs with GCC 4.2
and, as far as I remember, 4.1)
#1 Updated by dillon over 7 years ago
:New submission from Michel Salim <firstname.lastname@example.org>:
:cpdup cannot be built on 64-bit Linux (probably not on 64-bit DragonFly eit=
:once that becomes available).
:Build log attached (using Fedora 9, GCC 4.3. Same problem occurs with GCC 4=
:and, as far as I remember, 4.1)
The only actual error is occuring inside a system include file, which
I have no control over.
The 64<->32 bit warnings just require casts. cpdup is installing a
32 bit protocol identifier as a pointer in the hclink code, and
converting it back on callbacks. It should work as-is but it does
need a clean-up to get rid of the 64 bit warnings. If someone wants
to do that and submit a patch that would be great.
#3 Updated by msylvan over 7 years ago
The 64-bit build errors are due to a namespace clash (or rather C's lack of
one): GLIBC's stat.h internally uses bits/stat.h, which on machines with 64-bit
wordsizes uses __unused for its own purpose. I've attached a patch that renames
every use of __unused in cpdup to __cpdup_unused; it works fine on Linux (the
build instructions will have to be modified accordingly)
#9 Updated by dillon over 7 years ago
:Michel Salim <email@example.com> added the comment:
:Aha! Of course.. I was not familiar with it. Everything else is OK with both
The __cpdup_unused is ok. Not fun, but I can't think of another solution
at the moment.
Lets not use size_t for the casts. Does linux have an intptr_t ? Can
we use that?