pgf90-Error-Switch -u expects an argument

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
scottj

pgf90-Error-Switch -u expects an argument

#1 Unread post by scottj »

Hello,

I'm trying to build ROMS on a PIII system with PGI compilers (v. 7.06) and the build fails with the following error:

cd Build; mpif90 -c -u -Bstatic -fastsse -Mipa=fast -tp p6 mod_kinds.f90
pgf90-Error-Switch -u expects an argument
-u<undef> Passed to linker; generate undefined reference
make: *** [Build/mod_kinds.o] Error 1

The only change I made to the makefiles outside of the user-defined area was to change the processor type from "k8-64" to "p6" in the above referenced line of Linux-pgi.mk.

The comment in this file pertaining to the offending "-u" switch implies that the undefined symbol should be okay:

# According to the PGI manual, the -u -Bstatic flags initializes
# the symbol table with -Bstatic, which is undefined for the linker.
# An undefined symbol triggers loading of the first member of an
# archive library.

but that doesn't seem to be the case for me.

I wasn't able to find much info in the PGI documentation about the -u switch. Anyone else have a similar problem?

Thanks,
Scott

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#2 Unread post by jcwarner »

i couldn't find the previous posts on the Bstatic issue, but Hernan had a short discussion on this issue before.
Try to compile with
-c -fastsse -Mipa=fast -tp p6

and see if that works.
I think the -u means "do not use the next command"

scottj

#3 Unread post by scottj »

Thanks,

I dropped the "-u -Bstatic" as you suggested and it built successfully.

cheers,
Scott

FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

#4 Unread post by FengZhou »

Hi, Scott,

I have met similar problems like you,

mpif90 -c -g -check bounds mod_kinds.f90
pgf90-Error-Unknown switch: -check
make: *** [mod_kinds.o] Error 1
rm mod_kinds.f90

Would you please tell which file shall I modify? I can't find the parameters you said above.

Thanks in advance!

zhou
scottj wrote:Thanks,

I dropped the "-u -Bstatic" as you suggested and it built successfully.

cheers,
Scott

FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

#5 Unread post by FengZhou »

yes, I modified the Compiler/Linux-mpif90.mk, and got in new trouble:


mpif90 -c -fastsse -Mipa=fast -tp p6 -Vaxlib master.o ocean_control.o -o oceanM libNLM.a libUTIL.a libMODS.a -L./netcdf_ifc -lnetcdf
pgf90-Fatal-Could not find alternate compiler: /opt/pgi/linux86/axlib/bin/pgf90
make: *** [oceanM] Error 3
rm mod_kinds.f90

b.t.w, I use roms2.3. I have problems to upgrade to 3.0 via svn - can't export source dirs to the local machine.

FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

#6 Unread post by FengZhou »

Thanks, problem fixed.

cancel -Vaxlib.

Post Reply