- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Problems with make
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
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
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
03-02-2005 12:17 AM
03-02-2005 12:17 AM
We have recently had a co-worker leave us (past away, not just quit). We asre trying to pick up on his work and figure out his code (we are a small shop where the engineers generally write their own code). In looking at one program, we make a small change to the code, type make and make does not compile the solution. No error messages, just no results.
I cannot see any problems with the makefile, but something is going on. All of the files are stil owned by the original user, but group write permissions are on and we can write into the directory.
Makefile and sample compile attempt follow:
$ ll plotpdaps
-rwxrwxrwx 1 lc users 230048 Jul 16 2004 plotpdaps
$ make plotpdaps
cc pdaps_plot.o counts_to_eu.o read_head.o parse_pdaps_gms.o bcdtosec.o sectoirigstr.o draw_tics.o sig_fig.o getlocaltime.o irigstrtobcd.o getstring.o calctime.o totaltime.o conv_time_args.o decimate.o-o plotpdaps -I/usr/include/X11R5/X11 -I/opt/graphics/starbase/include -L/opt/graphics/common/lib -L/usr/lib/X11R5 -L/opt/graphics/starbase/lib -lXwindow -lXt -lX11 -lhpgfx -lXhp11 -lddCADplt -lm -ldld
$ ll plotpdaps
-rwxrwxrwx 1 lc users 230048 Jul 16 2004 plotpdaps
$ cat Makefile
# compile the pdaps_plot program
# For includes and libs necessary for starbase, see "Graphics
# Administration Guide HP-UX 10.x".
CCOPTS = -Ae -g -c -Dhp9000
LIBES = -L/opt/graphics/common/lib -L/usr/lib/X11R5 \
-L/opt/graphics/starbase/lib -lXwindow -lXt -lX11 -lhpgfx -lXhp11 \
-lddCADplt -lm -ldld
INCS = -I/usr/include/X11R5/X11 -I/opt/graphics/starbase/include
OBJECTS = pdaps_plot.o counts_to_eu.o read_head.o parse_pdaps_gms.o\
bcdtosec.o sectoirigstr.o draw_tics.o sig_fig.o getlocaltime.o\
irigstrtobcd.o getstring.o calctime.o totaltime.o conv_time_args.o\
decimate.o
plotpdaps : $(OBJECTS)
cc $(OBJECTS)-o plotpdaps $(INCS) $(LIBES)
printpdaps : $(OBJECTS)
cc -o printpdaps $(OBJECTS) $(INCS) $(LIBES)
pdaps_plot.o : pdaps_plot.c
cc $(CCOPTS) pdaps_plot.c
counts_to_eu.o : counts_to_eu.c
cc $(CCOPTS) counts_to_eu.c
read_head.o : read_head.c
cc $(CCOPTS) read_head.c
parse_pdaps_gms.o : parse_pdaps_gms.c
cc $(CCOPTS) parse_pdaps_gms.c
draw_tics.o : draw_tics.c
cc $(CCOPTS) draw_tics.c
bcdtosec.o : bcdtosec.c
cc $(CCOPTS) bcdtosec.c
sectoirigstr.o : sectoirigstr.c
cc $(CCOPTS) sectoirigstr.c
sig_fig.o : sig_fig.c
cc $(CCOPTS) sig_fig.c
getlocaltime.o : getlocaltime.c
cc $(CCOPTS) getlocaltime.c
irigstrtobcd.o : irigstrtobcd.c
cc $(CCOPTS) irigstrtobcd.c
getstring.o : getstring.c
cc $(CCOPTS) getstring.c
calctime.o : calctime.c
cc $(CCOPTS) calctime.c
totaltime.o : totaltime.c
cc $(CCOPTS) totaltime.c
conv_time_args.o : conv_time_args.c
cc $(CCOPTS) conv_time_args.c
decimate.o : decimate.c
cc $(CCOPTS) decimate.c
clean :
rm -f *.o
$
Any help would be nice.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 12:25 AM
03-02-2005 12:25 AM
Re: Problems with make
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 12:33 AM
03-02-2005 12:33 AM
Re: Problems with make
you need a space after the "$(OBJECTS)" in the next line:
cc $(OBJECTS)-o plotpdaps $(INCS) $(LIBES)
should be:
cc $(OBJECTS) -o plotpdaps $(INCS) $(LIBES)
If you look in the output of the make command you can see:
decimate.o-o plotpdap
should have been:
decimate.o -o plotpdap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 12:38 AM
03-02-2005 12:38 AM
Re: Problems with make
Good eyes, but that did produce an error message, once I did the suggested /bin/su -
I did do the suggested su - to the old user's name, and this time it worked without any problems. Begining to look like an environmental or permissions problme, so I'll keep looking in those directions.
Thanks for the help so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 01:38 AM
03-02-2005 01:38 AM
Re: Problems with make
Also look for ACL's, for instance on the directory. Or if all objects are readable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 02:00 AM
03-02-2005 02:00 AM
Re: Problems with make
Regards
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 02:11 AM
03-02-2005 02:11 AM
Re: Problems with make
Check all of your dependency rules for this exact syntax:
plotpdaps : $(OBJECTS)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 03:21 AM
03-02-2005 03:21 AM
Re: Problems with make
The cc command is not aliased on the working login or the departed user's login. The two logins have simular paths through the top 15 directories (with one minor exception on mine, referencing an elm directory first).
The makefile has a
One interesting thing I did notice, is that when I tried the make as me and the typo above "decimate.o-o" was in the makefile, I received no error about this (as in the original post). But when I tried the su as suggested by Jean-Luc, the make failed with an error message about this exact point. I fixed the typo (introduced in my trouble shoot attempts accidently), as the departed user the make command worked.
Interesting.
Oops, should have said. This is a 11.11 box, with C/ANSI C and developer's toolkit installed. This is also happening on a 10.20 box (with C/ANSI C installed). This is about the last thing to get switched before we switch to 11.11 completely.
Any other suggestions? Or information requests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 03:30 AM
03-02-2005 03:30 AM
Re: Problems with make
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 04:21 AM
03-02-2005 04:21 AM
Re: Problems with make
--------------------------------------------
$ touch pdaps_plot.c ; ll pdaps_plot.c plotpdaps
-rw-rw-r-- 1 lc users 40281 Mar 2 12:07 pdaps_plot.c
-rwxrwxrwx 1 lc users 184944 Mar 2 08:37 plotpdaps
$ make plotpdaps
cc -Ae -g -c -Dhp9000 pdaps_plot.c
cc pdaps_plot.o counts_to_eu.o read_head.o parse_pdaps_gms.o bcdtosec.o sectoirigstr.o draw_tics.o sig_fig.o getlocaltime.o irigstrtobcd.o getstring.o calctime.o totaltime.o conv_time_args.o decimate.o -o plotpdaps -I/usr/include/X11R5/X11 -I/opt/graphics/starbase/include -L/opt/graphics/common/lib -L/usr/lib/X11R5 -L/opt/graphics/starbase/lib -lXwindow -lXt -lX11 -lhpgfx -lXhp11 -lddCADplt -lm -ldld
$ ll pdaps_plot.c plotpdaps
-rw-rw-r-- 1 lc users 40281 Mar 2 12:07 pdaps_plot.c
-rwxrwxrwx 1 lc users 184944 Mar 2 08:37 plotpdaps
$
--------------------------------------------
As can be seen from this snippett, the date stamps on the single source file touched are later than the resultant program file both before and after the make command is issued.
Now, I do a:
$ sudo /bin/sh - lc #lc is the departed user's ID.
$ id
uid=106(lc) gid=104(wavies) groups=102(mysql)
$
Notice that this user is not even in the same group as the files are, but he is the owner of the files and directories.
Repeating the above test commands:
--------------------------------------------
$ touch pdaps_plot.c ; ll pdaps_plot.c plotpdaps
-rw-rw-r-- 1 lc users 40281 Mar 2 12:13 pdaps_plot.c
-rwxrwxrwx 1 lc users 184944 Mar 2 08:37 plotpdaps
$ make
cc -Ae -g -c -Dhp9000 pdaps_plot.c
cc pdaps_plot.o counts_to_eu.o read_head.o parse_pdaps_gms.o bcdtosec.o sectoirigstr.o draw_tics.o sig_fig.o getlocaltime.o irigstrtobcd.o getstring.o calctime.o totaltime.o conv_time_args.o decimate.o -o plotpdaps -I/usr/include/X11R5/X11 -I/opt/graphics/starbase/include -L/opt/graphics/common/lib -L/usr/lib/X11R5 -L/opt/graphics/starbase/lib -lXwindow -lXt -lX11 -lhpgfx -lXhp11 -lddCADplt -lm -ldld
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (pdaps_plot.o) was detected. The linked output may not run on a PA 1.x system.
$ ll pdaps_plot.c plotpdaps
-rw-rw-r-- 1 lc users 40281 Mar 2 12:13 pdaps_plot.c
-rwxrwxrwx 1 lc users 184944 Mar 2 12:13 plotpdaps
$
---------------------------------------------
In this second test run, as the owner of the files, you can see that the make does what it is supposed to do, and even optputs the "normal" PA 1.x warning message that is not see in the first run under my normal user ID. This is what is making me crazy. My normal ID has permissions (the directory is:
$ ll -d .
drwxrwxr-x 3 lc users 2048 Mar 2 12:13 .
$
My normal ID is a member of the users group.
Do not think it matters, but the lc user ID is now locked out from normal login
Back to rereading the man page for make again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 04:41 AM
03-02-2005 04:41 AM
Re: Problems with make
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 05:20 AM
03-02-2005 05:20 AM
Re: Problems with make
$ ll -d .
drwxrwxrwx 3 lc users 2048 Mar 2 12:47 .
$ getacl .
# file: .
# owner: lc
# group: users
user::rwx
group::rwx
class:rwx
other:rwx
$
After posting the last message above, I did change the directory permissions from 775 to 777, with no change is results.
Also overlooked above, is that the plot_pdaps.o file does get updated. After a make clean, all of the object files (*.o) do get updated, it's just the final cc to generate the executable that does not run.
I do wish to say thanks for the help so far. At least it does not seem to be something simple I was just overlooking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 05:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 05:58 AM
03-02-2005 05:58 AM
Re: Problems with make
I checked the environmental variables between the two accounts. One the one that was not working, CCOPTS was equal to '-Aa -g +DAportable', on the working account the CCOPTS variable was not set. I unset the CCOPTS variable on the non-working account, and the make started working as expected.
I do not understand this. If anyone can explain, I would love to hear it, but at least we have a workaround for the problem.
Thanks all, and I will be assigning points shortly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2005 10:27 PM
03-15-2005 10:27 PM