- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- aCC not producing a.out file
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
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
тАО09-07-2000 12:18 PM
тАО09-07-2000 12:18 PM
aCC not producing a.out file
aCC consumes the file without any error messages but does not produce object code (no main.o) and does not produce a linked executable (no a.out). I checked the entire drive for an a.out but cannot find it.
If I invoke aCC -c main.c then it does produce the main.o file as expected.
Any ideas?
Allen Broadman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2000 12:28 PM
тАО09-07-2000 12:28 PM
Re: aCC not producing a.out file
Try the -o option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-11-2000 11:03 AM
тАО09-11-2000 11:03 AM
Re: aCC not producing a.out file
Do you mean -O ? I tried that with the same result.
The aCC online docs are pretty clear that the default behavior of "aCC main.c" should be to produce object and executable code.
Allen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 12:00 AM
тАО09-12-2000 12:00 AM
Re: aCC not producing a.out file
Ive just installed an aCC compiler to sort this out, sorry for the delay.
You can compile your program in 2 steps;
1. aCC -c hello.c
2. aCC hello.o
This creates your binary, a.out
You can also do the compile and link in 1 step;
1. aCC hello.c
This creates the binary a.out, but no object(.o) file.
Then you can execute the binary fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 08:05 AM
тАО09-12-2000 08:05 AM
Re: aCC not producing a.out file
As I said in my first post, aCC is not producing the a.out file. If I follow your steps exactly then the first command "aCC -c hello.c" does produce the object file hello.o
However, running aCC hello.o does NOT produce the a.out file. aCC silently runs with no response at all, but does not produce the output.
I tried using "aCC hello.o -o test.out" but this also does not produce a test.out output file. I have searched the entire file system for a.out and it is not being created anywhere.
Do you have any suggestions?
Thanks,
Allen Broadman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 08:21 AM
тАО09-12-2000 08:21 AM
Re: aCC not producing a.out file
Try to link it direct with: ld hello.o , should also generate a a.out file, eventually also with ld -v hello.o.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 08:38 AM
тАО09-12-2000 08:38 AM
Re: aCC not producing a.out file
Unfortunately, there is still no a.out being produced.
Running the linker directly with "ld -v hello.o" causes no output messages and no output executable. This is strange because at the very least I would think the linker would complain because no standard C runtime libs are being linked in on the command line.
Here is the output of aCC +w -v hello.c
(the warnings are expected because all the main function does is a "return 1;" )
$ aCC +w -v hello.c
/opt/aCC/lbin/ctcom -diag anachronisms,suggestions,warnings,futureerrors -inst compiletime -diags 523 -D __HP_CXD_SPP=1 -D __HP_aCC -D __hppa -D __hpux -D __unix -D __hp9000s800 -D __STDCPP__ -D _PA_RISC1_1 -I /opt/aCC/include -I /opt/aCC/include/iostream -I /usr -I /usr/include -inline_power 1 -longbranch 1 -cachesize 256 hello.c
Warning (suggestion) 431: "hello.c", line 1 # No uses of 'argc' were detected;
it may be possible to remove its declaration.
int main(int argc, char *argv[])
^^^^
Warning (suggestion) 431: "hello.c", line 1 # No uses of 'argv' were detected;
it may be possible to remove its declaration.
int main(int argc, char *argv[])
^^^^
/usr/ccs/bin/ld -o a.out /opt/langtools/lib/crt0.o -u ___exit -u main -L /opt/aCC/lib /opt/aCC/lib/cpprt0.o hello.o -lstd -lstream -lCsup -lm -lcl -lc /usr/lib/libdld.sl >/var/tmp/BAAa12366 2>/var/tmp/AAAa12366
removing /var/tmp/AAAa12366
removing /var/tmp/BAAa12366
removing hello.o
Any ideas?
Allen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 08:43 AM
тАО09-12-2000 08:43 AM
Re: aCC not producing a.out file
Ive done a clean install of aCC and the compile worked straight off, and yours doesnt work so to me this indicates you have problem with either your HP-UX install or with the compiler install.
Did aCC install cleanly ? (check /var/adm/sw/swagent.log)
What patch level are you running ?
Any other compilers installed ?
If you could give us an swlist output from your HP server that might help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 10:44 AM
тАО09-12-2000 10:44 AM
Re: aCC not producing a.out file
Im not so sure now that our simple programs were compiling are the same. Yours has more in it than the simple one I compiled. Mine looks like this;
#include
main()
{
printf("Hello Worldn");
}
Try using aCC to compile this and see if it creates a binary. Did for me. Ive got a funny feeling your trying to compile something which you cant do witn an aCC compiler alone - you may need a different compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 11:56 AM
тАО09-12-2000 11:56 AM
Re: aCC not producing a.out file
int main(int argc, char *argv[])
{
return 1;
}
Allen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 11:57 AM
тАО09-12-2000 11:57 AM
Re: aCC not producing a.out file
that the problem is in the linker, not the compiler?
aCC is just a driver program for ctcom and ld. It seems pretty clear
that ctcom is doing its job in producing object code, but that ld is
failing on the link phase. If I run the compiler by itself it produces
object code. However, if I run the linker on the object code using the
same command line that aCC uses (taken from the verbose mode of aCC) then
I get no output or error messages:
For example, running the following:
/usr/ccs/bin/ld -o a.out /opt/langtools/lib/crt0.o -u ___exit -u main -L
/opt/aCC/lib /opt/aCC/lib/cpprt0.o hello.o -lstd -lstream -lCsup -lm -lcl
-lc /usr/lib/libdld.sl
produces nothing, not even a message.
Following are the answers to your questions:
I cannot find any errors about aCC in swagent.log
We are using version A.03.13 - I am not sure how to determine the patch
version because its not in the release notes.
No other compilers are installed.
swlist output follows:
# swlist
# Initializing...
# Contacting target "nyhpux01"...
#
# Target: nyhpux01:/
#
#
# Bundle(s):
#
B3901BA B.11.01.06 HP C/ANSI C Developer's
Bundle for HP-UX 11.00 (S800)
B3913DB B.11.01.06 HP aC++ Compiler (S800)
B3919EA_B9U B.11.00 Special Edition HP-UX
Unlimited-User Lic
B5456CA C.01.16.00 HP-UX Development Kit for
Java*
HPUXEng32RT B.11.00 English HP-UX 32-bit
Runtime Environment
J1593AA B.02.00.06 HP Domain Server Control
J1607CA B.02.00.06 Netscape Fasttrack Server
J3623BA B.11.00.03 100BT/9000 GSC for B, C,
D, and J Series
OnlineDiag B.11.00.08.07 HPUX 11.0 Support Tools
Bundle
XSWGR1100 B.11.00.43 HP-UX Extension Pack,
December 1998
XSWHWCR1100 B.11.00.44 Extension Software Patch
Bundle
XSW_PatchECO197 A.1.0 Patch Replacement bundle
Y2K-1100 B.11.00.B0315 HP-UX Core OS Year 2000
Patch Bundle
#
# Product(s) not contained in a Bundle:
#
emacs 20.7 emacs
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2000 01:12 PM
тАО09-12-2000 01:12 PM
Re: aCC not producing a.out file
your swlist output looks pretty good. Found some patches for your version of aC++, A.03.13; PHSS_16587. Is it installed already ? (swlist -l fileset | grep PHSS_16587), actually its been superceeded already so if its installed you will need the later version; PHSS_21906.
Also, a patch for ld; PHSS_21947, is it installed ? (might be part of your gr bundle)
Also a patch for your ANSI/C compiler; PHSS_22272
Try those patches and see if it fixes your problem. Im using a different version of aC++ and ANSI/C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2000 04:13 AM
тАО09-13-2000 04:13 AM
Re: aCC not producing a.out file
/opt/aCC/lbin/ld -o a.out /opt/aCC/lib/crt0.o -u ___exit -u main -L /opt/aCC/lib /opt/aCC/lib/cpprt0.o hello.o -lstream -lstd -lCsup -lm -lcl -lc /usr/lib/libdld.sl >/var/tmp/AAAa20192 2>&1
removing /var/tmp/AAAa20192
My aCC uses a own linker in /opt/aCC/lbin/ld with the module /opt/aCC/lib/crt0.o, your linker comes from /usr/ccs/bin/ld, I don't know why.
Perhaps try to link the programm again with the ld command:
/opt/aCC/lbin/ld -o a.out /opt/aCC/lib/crt0.o -u ___exit -u main -L /opt/aCC/lib /opt/aCC/lib/cpprt0.o hello.o -lstream -lstd -lCsup -lm -lcl -lc /usr/lib/libdld.sl
I don't know why your aCC Compiler uses the other linker, try to find it out. If the above is working, you could make linkage phase manual.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2000 10:20 AM
тАО09-13-2000 10:20 AM
Re: aCC not producing a.out file
It seems to me at this point that a fresh install of the latest version of aCC is appropriate.
Thanks to both of you for your help in trying to resolve this problem.
Allen Broadman