Hello, When I try to build CLN-1.3.6 on my laptop this is the result, below. I did ./configure and make. Any assistance would be most welcome. Thank you, Phil Huffman libtool: compile: g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT base/low/cl_low_div.lo -MD -MP -MF base/low/.deps/cl_low_div.Tpo -c base/low/cl_low_div.cc -fno-common -DPIC -o base/low/.libs/cl_low_div.o base/low/cl_low_div.cc:13:8: error: declaration of 'divu_16_rest' in global scope conflicts with declaration with C language linkage uint16 divu_16_rest; ^ ./base/cl_low.h:447:21: note: declared with C language linkage here extern "C" uint16 divu_16_rest; // -> Rest r ^ base/low/cl_low_div.cc:104:8: error: declaration of 'divu_32_rest' in global scope conflicts with declaration with C language linkage uint32 divu_32_rest; ^ ./base/cl_low.h:597:21: note: declared with C language linkage here extern "C" uint32 divu_32_rest; // -> Rest r ^ base/low/cl_low_div.cc:210:8: error: declaration of 'divu_64_rest' in global scope conflicts with declaration with C language linkage uint64 divu_64_rest; ^ ./base/cl_low.h:987:21: note: declared with C language linkage here extern "C" uint64 divu_64_rest; // -> Rest r ^ Hardware Overview: Model Name: MacBook Air Model Identifier: MacBookAir10,1 Chip: Apple M1 Total Number of Cores: 8 (4 performance and 4 efficiency) Memory: 16 GB System Firmware Version: 6723.81.1 Serial Number (system): FVFFF4WCQ6LR Hardware UUID: F736846B-85AC-56FD-8081-0C79C98784E6 Provisioning UDID: 00008103-0011212236DA001E Activation Lock Status: Disabled System Software Overview: System Version: macOS 11.2.3 (20D91) Kernel Version: Darwin 20.3.0 Boot Volume: MacOS HD Boot Mode: Normal Computer Name: Phil’s MacBook Air User Name: Phil Huffman (prh) Secure Virtual Memory: Enabled System Integrity Protection: Enabled
Hi Phil, On 12.04.21 15:37, Philip Huffman via CLN-list wrote:
libtool: compile: g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -g -O2 -MT base/low/cl_low_div.lo -MD -MP -MF base/low/.deps/cl_low_div.Tpo -c base/low/cl_low_div.cc -fno-common -DPIC -o base/low/.libs/cl_low_div.o base/low/cl_low_div.cc:13:8: error: declaration of 'divu_16_rest' in global scope conflicts with declaration with C language linkage uint16 divu_16_rest; ^ ./base/cl_low.h:447:21: note: declared with C language linkage here extern "C" uint16 divu_16_rest; // -> Rest r
According to my reading of the C++ standard, this definition in global scope within cl_low_div.cc: uint16 divu_16_rest; can be well declared extern "C" within namespace scope (as done in cl_low.h), as long as it corresponds to the same entity (which it does). So, is this some compiler bug? Can you, please, apply this attached patch and see if it works? (Admittedly, it is a stab in the dark.) Also, please provide the output of g++ --version. Thanks. -richard. -- Richard B. Kreckel <https://in.terlu.de/~kreckel/>
participants (2)
-
Philip Huffman
-
Richard B. Kreckel