Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#2593 closed enhancement (fixed)

Solaris does not define __progname

Reported by: andreasf Owned by: bonefish
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

On a Solaris host, __progname is not defined. It is used by some of the tools, e.g. rc and mimeset.

Attachments (1)

addattr_progname.diff (523 bytes ) - added by andreasf 15 years ago.
proposed patch for addattr

Download all attachments as: .zip

Change History (7)

comment:1 by bonefish, 16 years ago

Resolution: fixed
Status: newclosed

I suppose this one can be closed too.

in reply to:  1 comment:2 by andreasf, 16 years ago

You wanted a cleaner solution than the current, but it's no longer blocking anything.

comment:3 by andreasf, 15 years ago

Resolution: fixed
Status: closedreopened
Version: R1/pre-alpha1R1/Development

This issue has reappeared in addattr at hrev36782:

MkDir1 /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr 
C++ /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/main.o 
/export/home/andreas/Haiku/haiku/src/bin/addattr/main.cpp:22:1: warning: "ERR" redefined
In file included from /usr/include/sys/ucontext.h:39,
                 from /usr/include/sys/signal.h:258,
                 from /usr/include/sys/procset.h:42,
                 from /usr/include/sys/wait.h:43,
                 from /usr/include/stdlib.h:39,
                 from /export/home/andreas/Haiku/haiku/src/bin/addattr/main.cpp:12:
/usr/include/sys/regset.h:105:1: warning: this is the location of the previous definition
C++ /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addAttr.o 
Link /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addattr 
Undefiniertes			erstmals referenziert
 Symbol  			    in Datei
__progname                          /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/main.o 
ld: Schwerer Fehler: symbol referencing errors. No output written to /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addattr
collect2: ld returned 1 exit status

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/lib ; /export/home/andreas/Haiku/haiku/build/scripts/rm_attrs /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/rm_attrs -f "/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addattr"
cc  -o "/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addattr"   "/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/main.o" "/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addAttr.o" \
"/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/lib/libroot_build.so" "/export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/lib/libbe_build.so" -lstdc++ -lsupc++  \


...failed Link /export/home/andreas/Haiku/haiku/generated-ppc/objects/sunos/x86/release/tools/addattr/addattr ...

Unfortunately the ticket doesn't mention how it was worked around previously...

by andreasf, 15 years ago

Attachment: addattr_progname.diff added

proposed patch for addattr

comment:4 by andreasf, 15 years ago

Attached a patch for addattr, adapted from rc code.

comment:5 by stippi, 15 years ago

Resolution: fixed
Status: reopenedclosed

Applied in hrev36783. One could probably rewrite the snippets where progname is used to remember the first parameter passed to main(), that should also be the program name.

comment:6 by axeld, 15 years ago

Makes sense; as that is more portable, anyway, it should be the preferred way for all build tools.

Note: See TracTickets for help on using tickets.