Issues installing netcdf with PGI compilers

Hi,

I’m trying to install netcdf 4.2.1.1 while including my installed PGI compilers.

My issue is that while I try to do so, I run into the error which states,


configure: error: C compiler cannot create executables
See `config.log’ for more details

and the offending line in config.log states:

configure:4136: checking whether the C compiler works
configure:4158: pgcc -o2 -Msignextend -V -DNDEBUG -DpgiFortran conftest.c >&5
pgi-cc-lin64: LICENSE MANAGER PROBLEM: No such feature exists.
Feature: pgi-cc-lin64
License path: /opt/pgi/license.dat:
FLEXnet Licensing error:-5,357
For further information, refer to the FLEXnet Licensing documentation,
available at "> www.acresso.com> ".

pgcc 11.8-0 64-bit target on x86-64 Linux -tp nehalem
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2011, STMicroelectronics, Inc. All Rights Reserved.
configure:4162: $? = 2
configure:4200: result: no
configure: failed program was:
| /* confdefs.h */

My version of the compiler is 11.8, I’m certain that the license file manager is running and pointing at the right license file. I am also fairly certain that my license purchase does cover the version of the compiler I’m using.

The OS i’m running is Ubuntu 12.04. Any help would be much appreciated.

Thanks!

Hi karthik0,

This message typically means that your license isn’t enabled for this feature, in this case the 64-bit PGI C compilers. Can you send this issue to PGU Customer Service (trs@pgroup.com)? Please include the PIN number for the license that your using (or just send them the full license.dat file if you don’t know the PIN number).

Thanks,
Mat

Hi Mat,

Thanks for your quick reply. I contacted Customer Service and they pointed out that my license covers only the use of Fortran compilers, and not the C/C++ compilers.

Hence, now I’m using gcc & g++ in the environment variables. I also reverted to installing netcdf 3.6.3, as I don’t need HDF5 and do not wish to go about installing it.

Now, I seem to run into the error :

configure: error: Could not link conftestf.o and conftest.o

Any suggestions?

Thanks!

The portion in config.log related to the above mentioned error is :

configure:23876: pgf90 -o conftest -g conftestf.o conftest.o
/usr/bin/ld: error: cannot open /usr/lib64/crt1.o: No such file or directory
/usr/bin/ld: error: cannot open /usr/lib64/crti.o: No such file or directory
/usr/bin/ld: error: /opt/pgi/linux86-64/11.8/lib/pgi.ld: SECTIONS seen after other input files; try -T/–script
/usr/bin/ld: error: cannot open /usr/lib64/crtn.o: No such file or directory
/usr/bin/ld: internal error in write_sections, at …/…/gold/reloc.cc:830
configure:23879: $? = 2
configure:23902: error: Could not link conftestf.o and conftest.o

Also, perhaps in a related issue, trying to compile a simple “hello world” program causes the following error :

/usr/bin/ld: cannot find /usr/lib64/crt1.o: No such file or directory
/usr/bin/ld: cannot find /usr/lib64/crti.o: No such file or directory

Hi Mat,

Sorry for all the bother, I’ve fixed the issue. I just used the command

locate crti.o

to find the location of the two files (they were at /usr/lib/x86_64-linux-gnu/ on my Ubuntu 12.04 install)

and then proceeded to create a symbolic link using

ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64

To link the location of where the files actually existed, and where the compiler was looking for them.

I’ve currently reverted to using the binary distribution of netcdf3.6.3, but I’m assuming actually installing netcdf and pointing environment variables at the right direction should allow for the compiler to successfully work.

I’ve seen hundreds of posts and issues on this forum that you helped out with, and they were supremely helpful in getting my issue solved.

Thanks again, Mat! =)