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
13 stars 11 forks source link

Unable to build #1

Closed CrystalShardz closed 4 years ago

CrystalShardz commented 4 years ago

When attempting to run make as instructed this fails. See output below:

phil@B88A60FA4E7F:/mnt/c/users/phil/downloads/tephra2-master$ make cd inversion_src; make; cd .. make[1]: Entering directory '/mnt/c/users/phil/downloads/tephra2-master/inversion_src' which mpicc-Wall -O3 -idirafter ../include -c master.c /bin/sh: 1: -Wall: not found makefile:38: recipe for target 'master.o' failed make[1]: *** [master.o] Error 127 make[1]: Leaving directory '/mnt/c/users/phil/downloads/tephra2-master/inversion_src' cd forward_src; make; cd .. make[1]: Entering directory '/mnt/c/users/phil/downloads/tephra2-master/forward_src' which gcc-Wall -O3 -idirafter ../include -o tephra2-2012 new_tephra.o tephra2_calc.o -lm ../lib64/libgc.a -ldl /usr/bin/ld: ../lib64/libgc.a(malloc.o): relocation R_X86_64_32S against symbolGC_obj_kinds' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mallocx.o): relocation R_X86_64_32S against symbol GC_obj_kinds' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(alloc.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(reclaim.o): relocation R_X86_64_32S against undefined symbol GC_leaked' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(allchblk.o): relocation R_X86_64_32S against symbolGC_hblkfreelist' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(misc.o): relocation R_X86_64_32S against undefined symbol GC_arrays' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(os_dep.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mark_rts.o): relocation R_X86_64_32S against undefined symbol GC_arrays' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(headers.o): relocation R_X86_64_32S against undefined symbolGC_arrays' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mark.o): relocation R_X86_64_32 against .text' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(obj_map.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(blacklst.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(finalize.o): relocation R_X86_64_32S against.bss' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(new_hblk.o): relocation R_X86_64_32S against symbol GC_obj_kinds' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(dyn_load.o): relocation R_X86_64_32 against symboldl_iterate_phdr@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mach_dep.o): relocation R_X86_64_32 against symbol `GC_push_current_stack' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status makefile:29: recipe for target 'tephra2-2012' failed make[1]: *** [tephra2-2012] Error 1 make[1]: Leaving directory '/mnt/c/users/phil/downloads/tephra2-master/forward_src'

Please can you advise how this can be resolved? This is running under Ubuntu 18.04.4 LTS

ljc-geo commented 4 years ago

Hi, I received your email. Thank you for bringing this to my attention.

First, let me ask you, do you have a working version of mpi installed. If you are trying to compile and use the inversion portion, this inversion executable needs to compile with 'mpicc' and needs access to the mpi libraries (the dev or devel packages).

Also, since the errors are quite long it would be helpful to capture them to a file and send me the file. When trying to read them, I feel some bits are missing. Could you do this?

Thanks, I will work on getting this to compile.

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

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


From: CrystalShardz notifications@github.com Sent: Monday, August 10, 2020 6:27 AM To: geoscience-community-codes/tephra2 tephra2@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [geoscience-community-codes/tephra2] Unable to build (#1)

When attempting to run make as instructed this fails. See output below:

phil@B88A60FA4E7F:/mnt/c/users/phil/downloads/tephra2-master$ make cd inversion_src; make; cd .. make[1]: Entering directory '/mnt/c/users/phil/downloads/tephra2-master/inversion_src' which mpicc-Wall -O3 -idirafter ../include -c master.c /bin/sh: 1: -Wall: not found makefile:38: recipe for target 'master.o' failed make[1]: [master.o] Error 127 make[1]: Leaving directory '/mnt/c/users/phil/downloads/tephra2-master/inversion_src' cd forward_src; make; cd .. make[1]: Entering directory '/mnt/c/users/phil/downloads/tephra2-master/forward_src'which gcc-Wall -O3 -idirafter ../include -o tephra2-2012 new_tephra.o tephra2_calc.o -lm ../lib64/libgc.a -ldl /usr/bin/ld: ../lib64/libgc.a(malloc.o): relocation R_X86_64_32S against symbolGC_obj_kinds' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mallocx.o): relocation R_X86_64_32S against symbol GC_obj_kinds' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(alloc.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(reclaim.o): relocation R_X86_64_32S against undefined symbol GC_leaked' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(allchblk.o): relocation R_X86_64_32S against symbol GC_hblkfreelist' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(misc.o): relocation R_X86_64_32S against undefined symbol GC_arrays' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(os_dep.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mark_rts.o): relocation R_X86_64_32S against undefined symbol GC_arrays' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(headers.o): relocation R_X86_64_32S against undefined symbol GC_arrays' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mark.o): relocation R_X86_64_32 against .text' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(obj_map.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(blacklst.o): relocation R_X86_64_32 against .rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(finalize.o): relocation R_X86_64_32S against .bss' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(new_hblk.o): relocation R_X86_64_32S against symbol GC_obj_kinds' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(dyn_load.o): relocation R_X86_64_32 against symbol dl_iterate_phdr@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: ../lib64/libgc.a(mach_dep.o): relocation R_X86_64_32 against symbol `GC_push_current_stack' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status makefile:29: recipe for target 'tephra2-2012' failed make[1]: [tephra2-2012] Error 1 make[1]: Leaving directory '/mnt/c/users/phil/downloads/tephra2-master/forward_src'

Please can you advise how this can be resolved? This is running under Ubuntu 18.04.4 LTS

— 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%2F1&data=02%7C01%7Clconnor%40usf.edu%7C27b3c3f6e17346d1ee9b08d83d180063%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637326520578902271&sdata=5gAQ8fWNiBCwTYPND4wDAt%2BGPZqEXHredtoUImAW2Xk%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABF6GGFWZ2LAGNRHJLHEGCDR77DPZANCNFSM4PZ2AKQQ&data=02%7C01%7Clconnor%40usf.edu%7C27b3c3f6e17346d1ee9b08d83d180063%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637326520578902271&sdata=tpWBQoPZcAKCayTE9zpFs5rZUfQcynCLC51UnAcsf0c%3D&reserved=0.

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

CrystalShardz commented 4 years ago

Hi, Thank you for your response. I have installed the mpi libraries onto my ubuntu machine using the libopenmpi-dev package and receive the same result. I have attached the output as requested. make.txt

ljc-geo commented 4 years ago

Thank you! I believe the problem is with the static libraries I compiled ~ five years ago for the memory management. They are out of data and rely on an older version of the c compiler (gcc). These memory management libraries are now available as packages for linux. For ubuntu, you will need to install these two additional packages:

libgc-dev : a conservative garbage collector for C (development) libgc1c2 : (this is a dependency and may install automatically with libgc-dev)

In case you need a source: https://ubuntu.pkgs.org/18.04/ubuntu-main-amd64/ Ubuntu 18.04 LTS (Bionic Beaver) - Ubuntu Main amd64https://ubuntu.pkgs.org/18.04/ubuntu-main-amd64/ Packages from Ubuntu Main amd64 repository of Ubuntu 18.04 LTS (Bionic Beaver) distribution. ubuntu.pkgs.org

I will update the makefiles on the gscommunitycodes (tepjhra2) github site today. I have compiled on my system (opensuse - tumbleweed) without errors so hopefully this will solve your compiling issues as well on ubuntu

Also, you will need to add openmpi to your environment. Here is some instruction if you need it:

Use the mpi-selector program . Try: mpi-selector --list

this will tell you which mpi you have. Then: mpi-selector --set xxxx

where xxx is the output from mpi-selector --list

then, the easiest is to log out then log back in to your system so that the changes will be 'sourced' and become part of your environment.

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

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


From: CrystalShardz notifications@github.com Sent: Wednesday, August 12, 2020 5:31 AM To: geoscience-community-codes/tephra2 tephra2@noreply.github.com Cc: Connor, Laura lconnor@usf.edu; Comment comment@noreply.github.com Subject: Re: [geoscience-community-codes/tephra2] Unable to build (#1)

Hi, Thank you for your response. I have installed the mpi libraries onto my ubuntu machine using the libopenmpi-dev package and receive the same result. I have attached the output as requested. make.txthttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoscience-community-codes%2Ftephra2%2Ffiles%2F5061797%2Fmake.txt&data=02%7C01%7Clconnor%40usf.edu%7Cccd7025086aa44277b0608d83ea294a1%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637328215278841821&sdata=kD6DQLwbK57upDmYFUy3Bvb%2Fc9BnsKEAjjw0ZRhfWX0%3D&reserved=0

— You are receiving this because you commented. 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%2F1%23issuecomment-672765140&data=02%7C01%7Clconnor%40usf.edu%7Cccd7025086aa44277b0608d83ea294a1%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637328215278841821&sdata=5%2BhD77Iww6aO%2Fu4Kcy4D7WQViFyYWbSWbP8MUGMv%2FyQ%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABF6GGAJ5CL3VTUDHJFSMFLSAJOQXANCNFSM4PZ2AKQQ&data=02%7C01%7Clconnor%40usf.edu%7Cccd7025086aa44277b0608d83ea294a1%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637328215278851817&sdata=mHOnnZLe7QAOzXkdOILUHTklOKHVlTXGSFPeC1uYtKU%3D&reserved=0.

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

CrystalShardz commented 4 years ago

Sorry for the delay to update you. I've just re-ran and can now successfully build the project on Ubuntu 👍 There are a few warnings but nothing to worry about. Ran a test using the sample data provided and this outputted correctly. Thank you for sorting so swiftly.

ljc-geo commented 4 years ago

No worries 🙂, I am glad we were able to get things updated and working.

Would you tell me what warnings you received? I did not receive any; maybe this is something i could fix before I close this issue.

Thanks!

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

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


From: CrystalShardz notifications@github.com Sent: Monday, August 17, 2020 5:47 AM To: geoscience-community-codes/tephra2 tephra2@noreply.github.com Cc: Connor, Laura lconnor@usf.edu; Comment comment@noreply.github.com Subject: Re: [geoscience-community-codes/tephra2] Unable to build (#1)

Sorry for the delay to update you. I've just re-ran and can now successfully build the project on Ubuntu 👍 There are a few warnings but nothing to worry about. Ran a test using the sample data provided and this outputted correctly. Thank you for sorting so swiftly.

— You are receiving this because you commented. 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%2F1%23issuecomment-674779879&data=02%7C01%7Clconnor%40usf.edu%7Cfd6db62f132b4982508f08d84292a0d5%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637332544810739864&sdata=KQXR1KyWwyLWajC2%2BVXV2Ors5bFX10alMC9Gk%2FOeZGE%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABF6GGFBHW24WHM37Y3COE3SBD4E7ANCNFSM4PZ2AKQQ&data=02%7C01%7Clconnor%40usf.edu%7Cfd6db62f132b4982508f08d84292a0d5%7C741bf7dee2e546df8d6782607df9deaa%7C0%7C0%7C637332544810749813&sdata=RW0dnQtOIGSIvFhd0sxBq2CrZW7iwG2MKL9PndvxAzU%3D&reserved=0.

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