ypmen / PulsarX

Pulsar searching
GNU General Public License v3.0
16 stars 6 forks source link

compile issue with ymw16 #1

Closed scottransom closed 3 years ago

scottransom commented 3 years ago

Just tried to email you this, but it bounced! It isn't really your problem, but you should know about it.

Hi Jumei and Dick (cc'ing Yunpeng)

So I'm using a new gcc compiler (v10.2.0) and it is not liking how the global variables (for example, the m_# variables defined in one of the headers) are being handled in the code.

I'm attaching the results of trying to compile. It seems like newer compilers are being more strict about how these things are being handled.

Scott

PS: I'm cc'ing Yunpeng since this affects the compilation of PulsarX as well

And here is some of the error output from ld:

ar: creating ymw16.a
a - dmdtau.o
a - dora.o
a - fermibubble.o
a - frb_d.o
a - galcen.o
a - gum.o
a - lmc.o
a - localbubble.o
a - ne_crd.o
a - nps.o
a - smc.o
a - spiral.o
a - thick.o
a - thin.o
a - ymw16par.o
/usr/bin/ld: ymw16.a(dmdtau.o):/home/sransom/src/ymw16_v1.3.2/cn.h:38: multiple definition of `m_3'; /tmp/cce7Y1nW.o:/home/sransom/src/ymw16_v1.3.2/cn.h:38: first defined here
/usr/bin/ld: ymw16.a(dmdtau.o):/home/sransom/src/ymw16_v1.3.2/cn.h:38: multiple definition of `ww'; /tmp/cce7Y1nW.o:/home/sransom/src/ymw16_v1.3.2/cn.h:38: first defined here
/usr/bin/ld: ymw16.a(dmdtau.o):/home/sransom/src/ymw16_v1.3.2/cn.h:38: multiple definition of `m_5'; /tmp/cce7Y1nW.o:/home/sransom/src/ymw16_v1.3.2/cn.h:38: first defined here
/usr/bin/ld: ymw16.a(dmdtau.o):/home/sransom/src/ymw16_v1.3.2/cn.h:38: multiple definition of `m_6'; /tmp/cce7Y1nW.o:/home/sransom/src/ymw16_v1.3.2/cn.h:38: first defined here
/usr/bin/ld: ymw16.a(dmdtau.o):/home/sransom/src/ymw16_v1.3.2/cn.h:38: multiple definition of `m_7'; /tmp/cce7Y1nW.o:/home/sransom/src/ymw16_v1.3.2/cn.h:38: first defined here
/usr/bin/ld: ymw16.a(dora.o):/home/sransom/src/ymw16_v1.3.2/cn.h:38: multiple definition of `m_3'; /tmp/cce7Y1nW.o:/home/sransom/src/ymw16_v1.3.2/cn.h:38: first defined here