geoscience-community-codes / tephra2

Tephra2 is a tephra dispersion simulation tool, used to estimate the mass of tephra that will accumulate at a site or over a region, given explosive eruption conditions.
https://gscommunitycodes.usf.edu/geoscicommunitycodes/public/tephra2/tephra2.php
GNU General Public License v3.0
14 stars 11 forks source link

Unable to compile #2

Closed wmoreland closed 3 years ago

wmoreland commented 3 years ago

Unfortunately I'm also getting an error when compiling tephra2. I am running Arch Linux (5.10.7-arch1-1). I've double-checked I have the gcc, openmpi, and gc dependencies installed. The output of the make attempt is:

cd inversion_src; make -f makefile.linux; cd ..
make[1]: Entering directory '/home/william/Documents/GitHub/tephra2/inversion_src'
mpicc -Wall -O3  -c ameoba.c
mpicc -Wall -O3  -c fit_tests.c
mpicc -Wall -O3  -c master.c
mpicc -Wall -O3  -c minimizing_func.c
mpicc -Wall -O3  -c slave.c
slave.c: In function ‘slave’:
slave.c:19:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
   19 |   int ret;
      |       ^~~
mpicc -Wall -O3  -c tephra_inversion.c
mpicc -Wall -O3  -c ../common_src/tephra2_calc.c
mpicc  -Wall -O3  -o tephra2-inversion_2020 ameoba.o fit_tests.o master.o minimizing_func.o slave.o tephra_inversion.o tephra2_calc.o -lm -lgc -ldl
/usr/bin/ld: fit_tests.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here
/usr/bin/ld: fit_tests.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here
/usr/bin/ld: master.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here
/usr/bin/ld: master.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here
/usr/bin/ld: minimizing_func.o:(.bss+0x18): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here
/usr/bin/ld: minimizing_func.o:(.bss+0x20): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here
/usr/bin/ld: slave.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here
/usr/bin/ld: slave.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here
/usr/bin/ld: tephra_inversion.o:(.bss+0x30): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here
/usr/bin/ld: tephra_inversion.o:(.bss+0x38): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here
/usr/bin/ld: tephra2_calc.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here
/usr/bin/ld: tephra2_calc.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [makefile.linux:9: tephra2-inversion_2020] Error 1
make[1]: Leaving directory '/home/william/Documents/GitHub/tephra2/inversion_src'
cd forward_src; make -f makefile.linux; cd ..
make[1]: Entering directory '/home/william/Documents/GitHub/tephra2/forward_src'
gcc -Wall -O3  -c new_tephra.c
gcc -Wall -O3  -c ../common_src/tephra2_calc.c -lm -lgc -ldl
gcc -Wall -O3  -o tephra2_2020 new_tephra.o tephra2_calc.o -lm -lgc -ldl
/usr/bin/ld: tephra2_calc.o:(.bss+0x0): multiple definition of `pdf'; new_tephra.o:(.bss+0x20): first defined here
/usr/bin/ld: tephra2_calc.o:(.bss+0x8): multiple definition of `fit'; new_tephra.o:(.bss+0x28): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [makefile.linux:9: tephra2_2020] Error 1
make[1]: Leaving directory '/home/william/Documents/GitHub/tephra2/forward_src'

I can't tell what is causing the issue although it seems multiple definitions of things isn't ideal. Is anything apparent to anyone else? Cheers, Will

ljc-geo commented 3 years ago

Hi,

Sorry, I missed your email, did you resolve the compiling problem? I am not encountering these issues, so it must be related to your system. Let me know if you need more help?

Laura Connor Research Associate 813-334-0546 (mobile)

School of Geosciences​ University of South Florida Tampa, Florida 33620


From: W. M. Moreland notifications@github.com Sent: Tuesday, January 19, 2021 6:32 AM To: geoscience-community-codes/tephra2 tephra2@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [geoscience-community-codes/tephra2] Unable to compile (#2)

Unfortunately I'm also getting an error when compiling tephra2. I am running Arch Linux (5.10.7-arch1-1). I've double-checked I have the gcc, openmpi, and gc dependencies installed. The output of the make attempt is:

cd inversion_src; make -f makefile.linux; cd ..

make[1]: Entering directory '/home/william/Documents/GitHub/tephra2/inversion_src'

mpicc -Wall -O3 -c ameoba.c

mpicc -Wall -O3 -c fit_tests.c

mpicc -Wall -O3 -c master.c

mpicc -Wall -O3 -c minimizing_func.c

mpicc -Wall -O3 -c slave.c

slave.c: In function ‘slave’:

slave.c:19:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

19 | int ret;

  |       ^~~

mpicc -Wall -O3 -c tephra_inversion.c

mpicc -Wall -O3 -c ../common_src/tephra2_calc.c

mpicc -Wall -O3 -o tephra2-inversion_2020 ameoba.o fit_tests.o master.o minimizing_func.o slave.o tephra_inversion.o tephra2_calc.o -lm -lgc -ldl

/usr/bin/ld: fit_tests.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: fit_tests.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: master.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: master.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: minimizing_func.o:(.bss+0x18): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: minimizing_func.o:(.bss+0x20): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: slave.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: slave.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: tephra_inversion.o:(.bss+0x30): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: tephra_inversion.o:(.bss+0x38): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: tephra2_calc.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: tephra2_calc.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

collect2: error: ld returned 1 exit status

make[1]: *** [makefile.linux:9: tephra2-inversion_2020] Error 1

make[1]: Leaving directory '/home/william/Documents/GitHub/tephra2/inversion_src'

cd forward_src; make -f makefile.linux; cd ..

make[1]: Entering directory '/home/william/Documents/GitHub/tephra2/forward_src'

gcc -Wall -O3 -c new_tephra.c

gcc -Wall -O3 -c ../common_src/tephra2_calc.c -lm -lgc -ldl

gcc -Wall -O3 -o tephra2_2020 new_tephra.o tephra2_calc.o -lm -lgc -ldl

/usr/bin/ld: tephra2_calc.o:(.bss+0x0): multiple definition of `pdf'; new_tephra.o:(.bss+0x20): first defined here

/usr/bin/ld: tephra2_calc.o:(.bss+0x8): multiple definition of `fit'; new_tephra.o:(.bss+0x28): first defined here

collect2: error: ld returned 1 exit status

make[1]: *** [makefile.linux:9: tephra2_2020] Error 1

make[1]: Leaving directory '/home/william/Documents/GitHub/tephra2/forward_src'

I can't tell what is causing the issue although it seems multiple definitions of things isn't ideal. Is anything apparent to anyone else? Cheers, Will

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoscience-community-codes%2Ftephra2%2Fissues%2F2&data=04%7C01%7Clconnor%40usf.edu%7C3c6cdebebdc54403f6da08d8bc6ddbc5%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637466527312126501%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JGlRnSaO8ufK495FMwsNGLVMkbrUKAz1Z1wB2MBrsBE%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABF6GGBUEEDLTDL64L4KNELS2VUTTANCNFSM4WIUNB2Q&data=04%7C01%7Clconnor%40usf.edu%7C3c6cdebebdc54403f6da08d8bc6ddbc5%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637466527312136487%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LjiZjCVZa%2FZZhWEpi0Tah0zWw8oLBskAigq75N4NoPc%3D&reserved=0.

[EXTERNAL EMAIL] DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.

ljc-geo commented 3 years ago

Hi, I am just looking into this problem and I am getting the same errors that you write about. Let me look into this further and I will get back to you!

Laura Connor Research Associate 813-334-0546 (mobile)

School of Geosciences​ University of South Florida Tampa, Florida 33620


From: Connor, Laura lconnor@usf.edu Sent: Thursday, February 25, 2021 5:46 PM To: geoscience-community-codes/tephra2 reply@reply.github.com Subject: Re: [geoscience-community-codes/tephra2] Unable to compile (#2)

Hi,

Sorry, I missed your email, did you resolve the compiling problem? I am not encountering these issues, so it must be related to your system. Let me know if you need more help?

Laura Connor Research Associate 813-334-0546 (mobile)

School of Geosciences​ University of South Florida Tampa, Florida 33620


From: W. M. Moreland notifications@github.com Sent: Tuesday, January 19, 2021 6:32 AM To: geoscience-community-codes/tephra2 tephra2@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [geoscience-community-codes/tephra2] Unable to compile (#2)

Unfortunately I'm also getting an error when compiling tephra2. I am running Arch Linux (5.10.7-arch1-1). I've double-checked I have the gcc, openmpi, and gc dependencies installed. The output of the make attempt is:

cd inversion_src; make -f makefile.linux; cd ..

make[1]: Entering directory '/home/william/Documents/GitHub/tephra2/inversion_src'

mpicc -Wall -O3 -c ameoba.c

mpicc -Wall -O3 -c fit_tests.c

mpicc -Wall -O3 -c master.c

mpicc -Wall -O3 -c minimizing_func.c

mpicc -Wall -O3 -c slave.c

slave.c: In function ‘slave’:

slave.c:19:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

19 | int ret;

  |       ^~~

mpicc -Wall -O3 -c tephra_inversion.c

mpicc -Wall -O3 -c ../common_src/tephra2_calc.c

mpicc -Wall -O3 -o tephra2-inversion_2020 ameoba.o fit_tests.o master.o minimizing_func.o slave.o tephra_inversion.o tephra2_calc.o -lm -lgc -ldl

/usr/bin/ld: fit_tests.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: fit_tests.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: master.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: master.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: minimizing_func.o:(.bss+0x18): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: minimizing_func.o:(.bss+0x20): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: slave.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: slave.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: tephra_inversion.o:(.bss+0x30): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: tephra_inversion.o:(.bss+0x38): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

/usr/bin/ld: tephra2_calc.o:(.bss+0x0): multiple definition of `pdf'; ameoba.o:(.bss+0x0): first defined here

/usr/bin/ld: tephra2_calc.o:(.bss+0x8): multiple definition of `fit'; ameoba.o:(.bss+0x8): first defined here

collect2: error: ld returned 1 exit status

make[1]: *** [makefile.linux:9: tephra2-inversion_2020] Error 1

make[1]: Leaving directory '/home/william/Documents/GitHub/tephra2/inversion_src'

cd forward_src; make -f makefile.linux; cd ..

make[1]: Entering directory '/home/william/Documents/GitHub/tephra2/forward_src'

gcc -Wall -O3 -c new_tephra.c

gcc -Wall -O3 -c ../common_src/tephra2_calc.c -lm -lgc -ldl

gcc -Wall -O3 -o tephra2_2020 new_tephra.o tephra2_calc.o -lm -lgc -ldl

/usr/bin/ld: tephra2_calc.o:(.bss+0x0): multiple definition of `pdf'; new_tephra.o:(.bss+0x20): first defined here

/usr/bin/ld: tephra2_calc.o:(.bss+0x8): multiple definition of `fit'; new_tephra.o:(.bss+0x28): first defined here

collect2: error: ld returned 1 exit status

make[1]: *** [makefile.linux:9: tephra2_2020] Error 1

make[1]: Leaving directory '/home/william/Documents/GitHub/tephra2/forward_src'

I can't tell what is causing the issue although it seems multiple definitions of things isn't ideal. Is anything apparent to anyone else? Cheers, Will

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoscience-community-codes%2Ftephra2%2Fissues%2F2&data=04%7C01%7Clconnor%40usf.edu%7C3c6cdebebdc54403f6da08d8bc6ddbc5%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637466527312126501%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JGlRnSaO8ufK495FMwsNGLVMkbrUKAz1Z1wB2MBrsBE%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABF6GGBUEEDLTDL64L4KNELS2VUTTANCNFSM4WIUNB2Q&data=04%7C01%7Clconnor%40usf.edu%7C3c6cdebebdc54403f6da08d8bc6ddbc5%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637466527312136487%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LjiZjCVZa%2FZZhWEpi0Tah0zWw8oLBskAigq75N4NoPc%3D&reserved=0.

[EXTERNAL EMAIL] DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.

ljc-geo commented 3 years ago

Hi, The source code for the tephra2 forward model and the inversion model has been fixed; both now compile. The problem was gcc version 10. These fixes should work for any version of gcc, otherwise, let me know!

--Laura

wmoreland commented 3 years ago

That fixed it for me! That GCC update seems to have broken a lot of programs - thank you for the fix 👌