Hi,
I don’t have a Ubuntu system to check, but according to this:
https://manpages.ubuntu.com/manpages/focal/en/man3/uint64_t.3avr.html
int64_t is ‘long long’
And in pywrapper.cpp:
template bool PyWrapper::exec(const std::string&, bool, char*);
template bool PyWrapper::exec(const std::string&, bool, int8_t*);
template bool PyWrapper::exec(const std::string&, bool, uint8_t*);
template bool PyWrapper::exec(const std::string&, bool, int16_t*);
template bool PyWrapper::exec(const std::string&, bool, uint16_t*);
template bool PyWrapper::exec(const std::string&, bool, int32_t*);
template bool PyWrapper::exec(const std::string&, bool, uint32_t*);
template bool PyWrapper::exec(const std::string&, bool, int64_t*);
template bool PyWrapper::exec(const std::string&, bool, uint64_t*);
template bool PyWrapper::exec(const std::string&, bool, float*);
template bool PyWrapper::exec(const std::string&, bool, double*);
// These are needed on 64-bit GNU system that defines int64_t as long instead of long long
// Unfortunately this makes the code here not very portable.
template bool PyWrapper::exec(const std::string&, bool, long long*);
template bool PyWrapper::exec(const std::string&, bool, unsigned long long*);
So the additional instantiations of ‘long long’ and ‘unsigned long long’ is causing the problem. You could try commenting those last two lines out, and see if that works, since the int64 lines have already been defined.
On my RHEL system, int64 is ‘long int’ (aka ‘long’), so it compiles fine.
I’m not really a pydevice developer, so I’m not sure of the most portable way forward here, but perhaps we can use the epics typedefs rather than the C/C++ typedefs?
Cheers,
Matt
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Ha, Kiman via Tech-talk
Sent: Thursday, September 7, 2023 2:54 PM
To: tech-talk at aps.anl.gov
Subject: [EXTERNAL] PyDevice device module compile error with linux-arm
I am attempting to compile the Klemen’s PyDevice device support and getting compile errors.
Any suggestions?
Host: Linux-arm
Base 7.0.7
gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)
$ python3-config --ldflags --embed | sed 's/-[^l][^ ]*//g' | sed 's/-l//g'
python3.10 crypt dl m m
Kiman