Operating System - HP-UX
1822895 Members
3398 Online
109645 Solutions
New Discussion юеВ

cc: warning 422: Unknown option

 
vickyjovial
New Member

cc: warning 422: Unknown option

I have downloaded e2fsprogs-1.41.8.tar from http://sourceforge.net.

Then run configure with "--enable-elf-shlibs" flag to build the shared libraries. This runs fine.
# ./configure --enable-elf-shlibs

But when I run make to build the binaries and libraries I encountered below error.

# make
cd .; CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
config.status: creating ./lib/ext2fs/ext2_types.h
config.status: executing default-1 commands
`lib/blkid/blkid_types.h' is up to date.
`lib/uuid/uuid_types.h' is up to date.
SUBST compile_et
SUBST ext2_err.et
COMPILE_ET ext2_err.et
make libs
`lib/ext2fs/ext2_types.h' is up to date.
`lib/blkid/blkid_types.h' is up to date.
`lib/uuid/uuid_types.h' is up to date.
SUBST compile_et
SUBST ext2_err.et
COMPILE_ET ext2_err.et
making all in lib/et
SUBST compile_et
cd ../..; CONFIG_FILES=lib/et/Makefile ./config.status
config.status: creating lib/et/Makefile
config.status: executing default-1 commands
MKDIR elfshared
CC error_message.c
cc: warning 422: Unknown option "fPIC" ignored.
CC et_name.c
cc: warning 422: Unknown option "fPIC" ignored.
CC init_et.c
cc: warning 422: Unknown option "fPIC" ignored.
CC com_err.c
cc: warning 422: Unknown option "fPIC" ignored.
CC com_right.c
cc: warning 422: Unknown option "fPIC" ignored.
GEN_LIB libcom_err.a
GEN_ELF_SOLIB libcom_err.so.2.1
cc: warning 422: Unknown option "-" ignored.
cc: warning 422: Unknown option "h" ignored.
cc: warning 422: Unknown option "a" ignored.
/usr/ccs/bin/ld: (Warning) Ignoring -s option. -r will override -s
/usr/ccs/bin/ld: Can't open libcom_err.so.2
/usr/ccs/bin/ld: No such file or directory
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


I don't know why it's happening in HPUX, where the same cleanly passes on Linux machines.

/usr/ccs/bin/ld: Can't open libcom_err.so.2
Notice that it's trying to open .so shared library, whereas I am building this on pa machine.
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: cc: warning 422: Unknown option

Shalom,

1) Check that the shared libraries are installed on your system
2) If yes, make sure the location of the shared libaries is part of the variable SHLIB_PATH
3) If no, get the shared libraries and then do step 2.

Yes, Linux comes with a more complete set of shared libraries. A lot of developers do not build code with the intention of it running on HP-UX.

More assembly required.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: cc: warning 422: Unknown option

>cc: warning 422: Unknown option "fPIC" ignored.

These are gcc options. You'll either have to change the options to work with cc or use gcc to build it.
vickyjovial
New Member

Re: cc: warning 422: Unknown option

These doesn't helped much.
I would like to mention few more things here:
1.
/usr/ccs/bin/ld: Can't open libcom_err.so.2
We are trying to create this shared library, which ld is trying to open. So it is not required to check whether same shared libraries are installed on the system or not.

2.
Using make, libcom_err.a is created at e2fsprogs-1.41.8/lib/et, but getting error for shared library libcom_err.so.2

3.
By using gcc now getting following error:
# make
cd ./util ; make subst
CC subst.c
LD subst
cd .; CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
config.status: creating ./lib/ext2fs/ext2_types.h
config.status: executing default-1 commands
cd .; CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
config.status: creating ./lib/blkid/blkid_types.h
config.status: executing default-1 commands
cd .; CONFIG_FILES=./lib/uuid/uuid_types.h ./config.status
config.status: creating ./lib/uuid/uuid_types.h
config.status: executing default-1 commands
SUBST compile_et
SUBST ext2_err.et
COMPILE_ET ext2_err.et
make libs
cd .; CONFIG_FILES=./lib/ext2fs/ext2_types.h ./config.status
config.status: creating ./lib/ext2fs/ext2_types.h
config.status: executing default-1 commands
cd .; CONFIG_FILES=./lib/blkid/blkid_types.h ./config.status
config.status: creating ./lib/blkid/blkid_types.h
config.status: executing default-1 commands
`lib/uuid/uuid_types.h' is up to date.
`compile_et' is up to date.
COMPILE_ET ext2_err.et
making all in lib/et
MKDIR elfshared
CC error_message.c
CC et_name.c
CC init_et.c
CC com_err.c
CC com_right.c
GEN_LIB libcom_err.a
GEN_ELF_SOLIB libcom_err.so.2.1
/usr/ccs/bin/ld: Can't open libcom_err.so.2
/usr/ccs/bin/ld: No such file or directory
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.




Dennis Handly
Acclaimed Contributor

Re: cc: warning 422: Unknown option

>By using gcc now getting following error:

You need to toss this makefile garbage and show us the raw gcc commands.

What does this do: GEN_ELF_SOLIB libcom_err.so.2.1