Hi:
I tried to install ROMS plot package on my MAC OX 10.4.11 machine. My fortran complier is GNU gfortran. Since the ./Compilers/ do not have Darwin-gfortran.mk, I copy the Linex-gfortran.mk to Darwin-gfortran.mk. Then I tried make. It report a problem as follows:
/usr/bin/ld: warning -L: directory name (/usr/X11R6/lib64) does not exist
/usr/bin/ld: can't locate file for: -lX11
collect2: ld returned 1 exit status
I actually found I do not have /usr/X11R6/lib64 forder, but instead I have /usr/X11R6/lib.
So I change the "LIBS += -L/usr/X11R6/lib64 -lX11" in Darwin-gfortran.mk to "LIBS += -L/usr/X11R6/lib -lX11"
then another problem was report as
/usr/bin/ld: warning /usr/local/lib/libgfortran.dylib cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
/usr/bin/ld: warning fat file: /usr/local/lib/libgcc_s.10.4.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
/usr/bin/ld: Undefined symbols:
__gfortran_compare_string
__gfortran_runtime_error_at
__gfortran_set_options
__gfortran_st_open
__gfortran_st_read
__gfortran_st_read_done
__gfortran_st_write
__gfortran_st_write_done
__gfortran_stop_numeric
__gfortran_transfer_character
__gfortran_transfer_integer
__gfortran_transfer_logical
__gfortran_transfer_real
__gfortran_exit_i4
__gfortran_concat_string
__gfortran_fdate
__gfortran_os_error
__gfortran_runtime_error
__gfortran_string_index
__gfortran_st_rewind
__gfortran_pow_i4_i4
_png_create_info_struct
_png_create_write_struct
_png_destroy_write_struct
_png_init_io
_png_malloc
_png_set_IHDR
_png_set_rows
_png_write_png
__gfortran_set_args
__gfortran_store_exe_path
collect2: ld returned 1 exit status
Please help with this problem Or please give some suggestions on installing the plot package on Darwin.
Thanks
Linking Problem when install ROMS Plot Package
-
- Posts: 24
- Joined: Fri Aug 29, 2008 4:13 am
- Location: Virginia Institute of Marine Sciences
Re: Linking Problem when install ROMS Plot Package
Do you know which architecture you have? Is it an Intel chip or a PowerPC? Macs used to be all PPC, but are moving to (all?) Intel. Make sure that both your gfortran and your NCAR graphics are for the appropriate system, also the Netcdf library. Or do you have a stray -arch from starting from a Linux file? Perhaps you would do better to start from a Darwin file.
-
- Posts: 24
- Joined: Fri Aug 29, 2008 4:13 am
- Location: Virginia Institute of Marine Sciences
Re: Linking Problem when install ROMS Plot Package
Thank you for the reply, Kate. Sorry, I am a new beginner on the Linex system. Here I am a little confused about the conception about "the appropriate system". My NCL, gfortran and netcdf all could work sperately. Do they mean that they are already for the appropriate system.
Re: Linking Problem when install ROMS Plot Package
This isn't about Linux, it's about Mac. You can find out what you have with "uname -a". For me, on the Mac, it gives stuff starting with Darwin and ending with i386. Thus I have an Intel architecture. I do have the plotting code compiled, but it shows as being of file type "executable ppc", so I'm sure I compiled it under the old regime back when I had a PowerPC Mac. It still works because the Macs have some sort of compatibility mode where it can run executables of either type. That said, to link parts together into a new executable, the parts all have to be of one type or the other.
You can run the command "file <name>" to find out what type an executable or .o file is. If something is a library, it's not so easy because it will show as being a library. The file libnetcdf.a is a collection of .o files and you could pull out one of the .o components with the "ar" command and run "file" on it.
You can run the command "file <name>" to find out what type an executable or .o file is. If something is a library, it's not so easy because it will show as being a library. The file libnetcdf.a is a collection of .o files and you could pull out one of the .o components with the "ar" command and run "file" on it.
-
- Posts: 24
- Joined: Fri Aug 29, 2008 4:13 am
- Location: Virginia Institute of Marine Sciences
Re: Linking Problem when install ROMS Plot Package
I'll have a new try. Thanks a lot.