- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- error 2005: invalid option '-x'
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2011 07:54 AM
07-06-2011 07:54 AM
I downloaded the GNU compiler from the HP website, to run on an HP 11i3 itanium server (only 11i2 version available for download).
But am having difficulty getting a simple dummy program to compile. My aim is to get Doxygen compiled, if I can...
My C program is as follows:
// This program does nothing except return 0, for use when
// testing rtest scripts.
#include <stdlib.h>
int main( int argc, char** argv )
{
printf( "strcmp(20051001,20051101) = %d",
strcmp( "20051001", "20051101" ) );
printf( "strcmp(20051001,20051001) = %d",
strcmp( "20051001", "20051001" ) );
printf( "strcmp(20051001,20050901) = %d",
strcmp( "20051001", "20050901" ) );
return 0;
}
Saved as dummy.c and compiled by the command:
(fjack) 122 % /full/path/to/downloaded/gcc dummy.c
error 2005: invalid option '-x'
(fjack) 123 % ls
total 240
-rwxr-xr-x 1 fjack generic 5520 Sep 27 2005 dummy
drwxr-xr-x 16 fjack generic 1024 Apr 2 2010 ..
drwxr-xr-x 2 fjack generic 1024 Jul 6 15:15 .
(fjack) 124 % /full/path/to/downloaded/gcc -pedantic dummy.c
randgen.c:1:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
randgen.c:1:1: warning: (this will be reported only once per input file) [enabled by default]
error 2005: invalid option '-x'
The warnings I can live with, it's only a test program ;o) but where is this invalid -x option? From GNU documentation it's the way of specifying the language, if you don't want it to work it out by the file extension but can't see (or imagine) where this is coming from.
(fjack) 126 % /full/path/to/downloaded/gcc -v
Using built-in specs.
COLLECT_GCC=/full/path/to/downloaded/gcc
COLLECT_LTO_WRAPPER =/full/path/to/downloaded/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../libexec/gcc/ia64-hp-hpux11.23/4.6.0/lto-wrapper
Target: ia64-hp-hpux11.23
Configured with: /tmp/gcc-4.6.0.tar.gz/gcc-4.6.0/configure --host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23 --prefix=/opt/hp-gcc-4.6.0 --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/ia64-hp-hpux11.23 --with-mpfr=/proj/opensrc/be/ia64-hp-hpux11.23 SED=/usr/bin/sed
Thread model: posix
gcc version 4.6.0 (GCC)
uname -a returns
HP-UX hostname B.11.31 U ia64 0938135552 unlimited-user license
Solved! Go to Solution.
- Tags:
- gcc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2011 08:45 AM
07-06-2011 08:45 AM
Re: error 2005: invalid option '-x'
Shalom,
I would not be confortable running a compiler on 11.31 designed for use on 11.23.
--host=ia64-hp-hpux11.23
Unless the documentation specifically supports that, I would be more comfortable compiling from source.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2011 08:49 AM - edited 07-06-2011 08:51 AM
07-06-2011 08:49 AM - edited 07-06-2011 08:51 AM
Re: error 2005: invalid option '-x'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2011 09:43 AM - edited 07-06-2011 09:47 AM
07-06-2011 09:43 AM - edited 07-06-2011 09:47 AM
Re: error 2005: invalid option '-x'
Can you add -v to your compile line so we can narrow down who produces that error message.
It may be trying to use HP's as(1) and not the foreign devil version.
I assume that "/full/path/to/downloaded" was not changed from HP's value?
You may have to put /full/path/to/downloaded in your PATH.
Next time please specify the EXACT path you used for gcc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2011 03:20 AM
07-07-2011 03:20 AM
Re: error 2005: invalid option '-x'
Dennis, you are right, I omitted to say how I'd installed gcc. Sorry.
Due to limitations of our hardware team, we can't get root to install gcc (something about impacting their support contract) so I had to do it as a non-root user. I downloaded the depot file, gunzip and tar xf'd it, then put links in my target directory to the un-tar'd location:
un-tar'd to: /psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/gcc
links created in: bin lib include lib libexec share/man directories from here /psg/tools/host/bin etc. to above location.
I added /psg/tools/host/bin to my PATH and SHLIB_PATH variables. So when I do which gcc and which as, the correct ones in my 'new' location are picked up.
host (fjack)110 % ls /psg/tools/host/bin
a2p dbilogstrip gprof objdump psed
acyclic dbiprof gv2gxl ora_explain pstruct
addr2line dbiproxy gvcolor osage ptar
ar diffimg gvgen patchwork ptardiff
as dijkstra gvmap perl ranlib
awk dot gvmap.sh perl5.10.0 readelf
bcomps dot2gxl gvpack perlbug s2p
bison dot_builtins gvpr perldoc sccmap
c++filt dotty gxl2dot perlivp sfdp
c2ph dprofpp gxl2gv pgawk shasum
ccomps elfedit h2ph pgawk-3.1.6 size
circo enc2xs h2xs piconv splain
cluster fdp igawk pl2pm strings
config_data find2perl instmodsh pod2html strip
corelist flex libnetcfg pod2latex tred
cpan g++ lneato pod2man twopi
cpan2dist gawk m4 pod2text unflatten
cpanp gawk-3.1.6 mm2gv pod2usage xsubpp
cpanp-run-perl gc neato podchecker yacc
cpp gcc nm podselect
curl gcov nop prove
curl-config gml2gv objcopy prune
But when I run the command with -v it's picking up the 'wrong' as as you guessed??
host (fjack) 151 % gcc -v -pedantic dummy.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../libexec/gcc/ia64-hp-hpux11.23/4.6.0/lto-wrapper
Target: ia64-hp-hpux11.23
Configured with: /tmp/gcc-4.6.0.tar.gz/gcc-4.6.0/configure --host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23 --prefix=/opt/hp-gcc-4.6.0 --with-gnu-as --without-gnu-ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/ia64-hp-hpux11.23 --with-mpfr=/proj/opensrc/be/ia64-hp-hpux11.23 SED=/usr/bin/sed
Thread model: posix
gcc version 4.6.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-pedantic'
/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../libexec/gcc/ia64-hp-hpux11.23/4.6.0/cc1 -quiet -v -iprefix /psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/ia64-hp-hpux11.23/4.6.0/ dummy.c -quiet -dumpbase dummy.c -auxbase dummy -pedantic -version -o /var/tmp//cc5eOb5N.s
GNU C (GCC) version 4.6.0 (ia64-hp-hpux11.23)
compiled by GNU C version 4.6.0, GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/ia64-hp-hpux11.23/4.6.0/../../../../ia64-hp-hpux11.23/include"
ignoring duplicate directory "/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/../../lib/gcc/ia64-hp-hpux11.23/4.6.0/include"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory "/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/../../lib/gcc/ia64-hp-hpux11.23/4.6.0/include-fixed"
ignoring nonexistent directory "/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/../../lib/gcc/ia64-hp-hpux11.23/4.6.0/../../../../ia64-hp-hpux11.23/include"
#include "..." search starts here:
#include <...> search starts here:
/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/ia64-hp-hpux11.23/4.6.0/include
/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/ia64-hp-hpux11.23/4.6.0/include-fixed
/psg/tools/host/GNU_C_C++/GCC_4_6_0/opt/hp-gcc-4.6.0/bin/../lib/gcc/../../include
/usr/include
End of search list.
GNU C (GCC) version 4.6.0 (ia64-hp-hpux11.23)
compiled by GNU C version 4.6.0, GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 8bb82ece916072d2847c95dadf363758
dummy.c:1:1: warning: C++ style comments are not allowed in ISO C90 [enabled by default]
dummy.c:1:1: warning: (this will be reported only once per input file) [enabled by default]
COLLECT_GCC_OPTIONS='-v' '-pedantic'
/usr/ccs/bin/as -v -x -o /var/tmp//ccIJzWyP.o /var/tmp//cc5eOb5N.s
error 2005: invalid option '-v'
HOST (fjack) 152 % which as
/psg/tools/host/bin/as
I hope this helps - I'm afraid it just confuses me ;o(
Many thanks,
Fiona
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2011 04:05 AM
07-07-2011 04:05 AM
Re: error 2005: invalid option '-x'
>I downloaded the depot file, gunzip and tar xf'd it, then put links in my target directory to the un-tar'd location:
This may make it useless if you don't invoke any control scripts to set up the application.
>it's picking up the 'wrong' as as you guessed?
$ as -x fff
error 2005: invalid option '-x'
You may have to use this to change to your alternate root: --prefix=/opt/hp-gcc-4.6.0
Not sure how.
You may just have to be root to install it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2011 04:26 AM
07-07-2011 04:26 AM
Re: error 2005: invalid option '-x'
Thanks Dennis, so if I understand you right, I need to use girly tears to appeal to the unix guy's better nature to install this as root...
Will try and get them to do this!
Many thanks,
Fiona
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2011 04:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2011 04:46 AM
07-08-2011 04:46 AM
Re: error 2005: invalid option '-x'
Hi Dennis,
my UNIX team are reluctant to do anything that looks remotely like 'software', but my crocodile tears worked, they installed the .depot file into /opt/hp-gcc, and after updating my path and library variables it all worked smashingly!
I think they get enjoyment out of torturing me like this... but many thanks for your help!
Fiona
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2011 02:43 PM
07-08-2011 02:43 PM
Re: error 2005: invalid option '-x'
>many thanks for your help!
If you're happy with the answers you were given, please assign some kudos:
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/4803621#M1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2011 03:12 PM
07-11-2011 03:12 PM
Re: error 2005: invalid option '-x'
He mentioned -B directory but that only works for the compiler proper.
He did say that if it didn't find as(1) under the initial installation directory, it would look it up in PATH.
So do you have /psg/tools/host/bin before /usr/ccs/bin in your PATH?
But there are other problems with not executing the control scripts by swinstall, the wrong system headers will be used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2021 05:56 PM
12-05-2021 05:56 PM
Re: error 2005: invalid option '-x'
How I can do for this error ?
I am build gcc 4.8.5 for HPUX 11.31_ia64.
All error is error 2005:invalid option '-x'. I am crazy