1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 <2023> 2024 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 <2023> 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: PyDevice device module compile error with linux-arm |
From: | "Ha, Kiman via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "Pearson, Matthew" <pearsonmr at ornl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 12 Sep 2023 03:10:54 +0000 |
Hi Matt, Yes, there are no compile errors after commenting on these two lines. My test target CPU is 32-bit. Thank you, Kiman From: Pearson, Matthew <pearsonmr at ornl.gov>
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 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 |