- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Not able to make .o files using cc -c
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
Forums
Discussions
Discussions
Discussions
Forums
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
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
тАО02-23-2010 02:45 AM
тАО02-23-2010 02:45 AM
Not able to make .o files using cc -c
I am trying to build TBB 2.2 on HPUX Itanium platform using HPUX cc compiler. The version of the cc compiler is HP C/aC++ B3910B A.06.12 [Oct 11 2006].
since the building did not take place because of errors, I decided to compile individual files. I gave the command
/usr/bin/cc -c -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -DUSE_PTHREAD +DD64 -mt -Wc,-ansi_for_scope,on -D__TBB_BUILD=1 -I../../src -I../../include ../../src/old/spin_rw_mutex_v2.cpp
The path to spin_rw_mutex_v2.cpp is correct, but it does not produce the .o file (spin_rw_mutex_v2.o) as supposed to be when -c option is given. I even tried removing the entire option list and giving the plain command (/usr/bin/cc -c -I ../../src -I ../../include ../../src/old/spin_rw_mutex_v2.cpp),it does nothing, not even throws errors.I tried doing the same thing with a hello world C program and it gives the .o file .Could anyone suggest me as to why this is happening or whether any settings have to be given to cc. Any help would be great.
Thanks
- Tags:
- aC++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 03:38 AM
тАО02-23-2010 03:38 AM
Re: Not able to make .o files using cc -c
Try to specify the object name by adding -o spin_rw_mutex_v2.o
/usr/bin/cc -c -o spin_rw_mutex_v2.o -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -DUSE_PTHREAD +DD64 -mt -Wc,-ansi_for_scope,on -D__TBB_BUILD=1 -I../../src -I../../include ../../src/old/spin_rw_mutex_v2.cpp
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 06:24 AM
тАО02-23-2010 06:24 AM
Re: Not able to make .o files using cc -c
I tried putting -o option also, still no luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 06:56 AM
тАО02-23-2010 06:56 AM
Re: Not able to make .o files using cc -c
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 07:21 AM
тАО02-23-2010 07:21 AM
Re: Not able to make .o files using cc -c
Thats the problem, it neither shows any errors nor does it create the .o file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 07:28 AM
тАО02-23-2010 07:28 AM
Re: Not able to make .o files using cc -c
of a C compiler on your ".cpp" file?
> [...] I tried doing the same thing with a
> hello world C program and it gives the .o
> file [...]
Rename your ".c" program file to ".cpp" and
then see how well it works.
dyi # mkdir sizx
dyi # cd sizx
dyi # cp -p ../siz.c siz.cpp
dyi # cc -c siz.cpp
dyi # ls -l
total 16
-rw-r--r-- 1 root sys 190 Aug 12 2009 siz.cpp
dyi # cp -p siz.cpp siz.c
dyi # cc -c siz.c
dyi # ls -l
total 48
-rw-r--r-- 1 root sys 190 Aug 12 2009 siz.c
-rw-r--r-- 1 root sys 190 Aug 12 2009 siz.cpp
-rw-r--r-- 1 root sys 2700 Feb 22 21:25 siz.o
You have to admit that it's very speedy on a
".cpp" file.
For the record:
dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi # cc -V
(Bundled) cc: HP C/aC++ B3910B A.06.12 [Oct 11 2006]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 08:09 AM
тАО02-23-2010 08:09 AM
Re: Not able to make .o files using cc -c
Whats the logic behind this? (I mean first copying it into a .cpp and then from that .cpp copying into .c and then it works). As mentioned in my first post that this is part of a build file (Makefile), so how should I change in order to make it work?.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 08:23 AM
тАО02-23-2010 08:23 AM
Re: Not able to make .o files using cc -c
It shows that the C compiler apparently does
not process C++ (".cpp") source files (in any
useful way).
> As mentioned in my first post [...]
What you didn't mention (anywhere) includes,
for example:
What, exactly, you're trying to build, and
where you got the kit.
How, exactly, you were trying to build it.
What, exactly, happened when you tried to
build it. "because of errors" lacks any
useful detail.
With my weak psychic powers, I have no way to
know what went wrong in the original build
attempt. All I can explain now is why your
manual attempt to compile a C++ source file
using the C compiler failed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 08:38 AM
тАО02-23-2010 08:38 AM
Re: Not able to make .o files using cc -c
Ok,so this is what I am trying to do. I am trying to build TBB (Thread Building Blocks) version 2.2 on HPUX Itanium platform. I got the source code for TBB from www.threadbuildingblocks.com. I am building the TBB source code using gmake (version 3.81, installed using swinstall on hpux). The errors as a result of gmake are as of the following:
1) Could not find .o files (the appropriate .o files as the result of /usr/bin/cc -c -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -DUSE_PTHREAD +DD64 -mt -Wc,-ansi_for_scope,on -D__TBB_BUILD=1 -I../../src -I../../include ../../src/old/SOURCE_FILES.cpp)
2) Could not make libtbb.so file since the .o files were not present.
As a result of the above two errors, the building process stopped. When I checked the installation directory, it was true that the appropriate .o files were not present. I ran the command (/usr/bin/cc -c -DTBB_DO_ASSERT -DDO_ITT_NOTIFY -DUSE_PTHREAD +DD64 -mt -Wc,-ansi_for_scope,on -D__TBB_BUILD=1 -I../../src -I../../include ../../src/old/SOURCE_FILES.cpp) individually to see if it would make a .o file , but did not. And thats how I ended up here. So my question is what changes do I have to make in the Makefile in order to incorporate what you have told.
Thanks.
- Tags:
- TBB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 10:45 AM
тАО02-23-2010 10:45 AM
Re: Not able to make .o files using cc -c
> www.threadbuildingblocks.com. [...]
ALP $ nslookup www.threadbuildingblocks.com
Server: alp-l.antinode.info
Address: 10.0.0.9
*** alp-l.antinode.info can't find www.threadbuildingblocks.com: Non-existent host/domain
> I am building the TBB source code using
> gmake [...]
No "configure" step?
> [...] So my question is what changes do I
> have to make in the Makefile [...]
I can't see it. Or whence it came.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-23-2010 03:23 PM
тАО02-23-2010 03:23 PM
Re: Not able to make .o files using cc -c
> www.threadbuildingblocks.com. [...]
You mean www.threadbuildingblocks.org?
And
http://www.threadingbuildingblocks.org/uploads/78/140/2.2/tbb22_004oss_src.tgz
?
The one which does this?:
dyi # gmake
build/common.inc:47: *** "HP-UX" is not supported. Add build/HP-UX.inc file with
os-specific settings . Stop.
Leave out any details, did you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 12:59 AM
тАО02-24-2010 12:59 AM
Re: Not able to make .o files using cc -c
Instead of this you should use -AA.
And as Steven said, if you want C++ you need to use the aCC command.
>so how should I change in order to make it work?
Possibly: CXX=aCC
>/usr/bin/cc -c
You can't use /usr/bin/cc. This should either be just aCC or /opt/aCC/bin/aCC.
>Steven: Rename your ".c" program file to ".cpp" and then see how well it works.
Yes because a .cpp file is an object file and is passed to ld, which is suppressed with -c.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:12 AM
тАО02-24-2010 01:12 AM
Re: Not able to make .o files using cc -c
You should read first the installation instruction for every piece of software you are trying to install.
Not every program wrote for linux would work on other flavour of Unix. Making things happening it is called porting. It is not usually an easy task...
Horia.
Horia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:28 AM
тАО02-24-2010 01:28 AM
Re: Not able to make .o files using cc -c
Regarding the porting, it was done previously by some of my friends and I have the ported version of tbb 2.1. Currently I am trying to build the ported tbb 2.1 on HPUX but the server here in the university does not have aCC compiler. Is there any other way to build tbb 2.1 on HPUX without using aCC compiler?. I tried using g++ but shows some out of scope and declaration errors. The server only has a cc compiler.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:55 AM
тАО02-24-2010 01:55 AM
Re: Not able to make .o files using cc -c
Then you'll also need to port it to g++.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 02:09 AM
тАО02-24-2010 02:09 AM
Re: Not able to make .o files using cc -c
I guess I can do nothing regarding building without aCC compiler. Would converting all .cpp files of the source to .c files help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 02:14 AM
тАО02-24-2010 02:14 AM
Re: Not able to make .o files using cc -c
Only if TBB was C source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 02:27 AM
тАО02-24-2010 02:27 AM
Re: Not able to make .o files using cc -c
TBB is a C++ library.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 05:06 AM
тАО02-24-2010 05:06 AM
Re: Not able to make .o files using cc -c
> Regarding the porting, [...]
Non-psychics often have difficulty debugging
invisible build procedures. What did you
expect?
> [...] it was done previously by some of my
> friends [...]
Have you talked to then about 2.2? Why annoy
strangers with requests for the impossible
when you have such talented friends?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 11:17 AM
тАО02-24-2010 11:17 AM
Re: Not able to make .o files using cc -c
I am sorry for giving the wrong website, I meant www.threadingbuildingblocks.org instead of .com. And yes I build the library using gmake (make 3.81). Configure was not required because the Makefile was already there. I changed some entries in the /build/HP-UX.inc to specify that I am using cc compiler. Had also made a HP-UX.cc.inc. Now coming to the porting, some of my friends did the porting of TBB 2.1 for HPUX and they had used aCC compiler for this purpose. Unfortunately the server present in my university does not have an aCC compiler, it only has a cc compiler. I tried using cc compiler for this purpose but thats when I got the errors. I tried my best to rectify the errors but could not solve it. My expectation on posting the question here was to get the answer. I like posting the questions here because this forum is so active and you get the response fast. I am sorry if I annoyed you regarding this matter.
Performance tuning of TBB 2.1 on HPUX is my final year project at my University. I havent worked on such complex projects as these during my former years. I am happy that I am getting help from this forum. Thank you once again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 01:22 PM
тАО02-24-2010 01:22 PM
Re: Not able to make .o files using cc -c
> /build/HP-UX.inc [...]
I still can't see it.
> [...] it only has a cc compiler. [...]
Not much good if you need a C++ compiler.
I'd guess that GCC is your only ($0) hope.
> I like posting the questions here [...]
It works better if you don't omit all the
important information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 09:16 PM
тАО02-24-2010 09:16 PM
Re: Not able to make .o files using cc -c
If your university has a support contract, they should be able to update to the latest aC++ version which has a combined C and C++ compilers.
There is an Eval compiler available:
http://www.hp.com/go/cpp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 11:12 PM
тАО02-24-2010 11:12 PM
Re: Not able to make .o files using cc -c
I tried compiling it with GCC and G++, doing the same procedure as I did for cc. But nothing worked.
Yes I think I have to ask the people who set up the server to install aCC else the project is deadend.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2010 11:21 PM
тАО02-24-2010 11:21 PM
Re: Not able to make .o files using cc -c
It would help if you provided more details on what errors you got?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2010 12:00 AM
тАО02-25-2010 12:00 AM
Re: Not able to make .o files using cc -c
Ya sure I will post the output shown by GCC and G++ as soon as possible. The problem is I wont be able to post it today, I can post it on tuesday since our university department is closed and will reopen only next tuesday. Btw I tried to download the eval version which you had provided,it says "You do not have the proper permissions to view this content. Please see the Membership benefits page for more information on DSPP membership". I just have an individual DSPP membership. Could you provide me with an alternate option of downloading the eval version.
Thanks