- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 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
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
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.