NCAR/pyngl

PyNGL compilation failure

Opened this issue · 4 comments

On a Fedora-36 box with python 3.10, installation via the setup.py script fails with the message:

/usr/bin/ld: /usr/lib64/ncarg/libncarg.a(pcblda.o):(.bss+0x104b0): multiple definition of pcmp04_'; build/temp.linux-x86_64-3.10/src/hlu/hlu_wrap.o:/root/import/pyngl/src/hlu/hlu_wrap.c:3350: first defined here /usr/bin/ld: warning: alignment 8 of symbol pcmp04_' in build/temp.linux-x86_64-3.10/src/hlu/hlu_wrap.o is smaller than 16 in /usr/lib64/ncarg/libncarg.a(pcmpxy.o)
collect2: error: ld returned 1 exit status

I also have the same problem. Tried adding #pragma(1), which gave me a multiply defined pcmp04/ I also tried adding static in front of the structure definition of pcmp04 which allowed me to compile, but that resulted in a core dump when trying to use pyngl

Added extern to the struct in hlu_wrap.c and everything work

Hi rpasken,
can you please specify in which line you did the modification and exactly what it was?

Thanks in advance!

Ivica

something like this:

'''
struct common1 {
float pang, plat, plon;
} extern NGCALLF(pcmp04,PCMP04);

'''