Bug 233385 - sdcc: sdcpp command not fonud
sdcc: sdcpp command not fonud
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: sdcc (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Trond Danielsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-21 19:30 EDT by Scott Tsai
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.6.0-9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-27 02:24:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Scott Tsai 2007-03-21 19:30:21 EDT
Description of problem:
Can't use sdcc without adding /usr/libexec/sdcc to PATH.

Version-Release number of selected component (if applicable):
sdcc-2.6.0-8.fc6

How reproducible:
always

Steps to Reproduce:
1. echo 'void main() {}' > t.c
2. sdcc-sdcc t.c
  
Actual results:
sh: sdcpp: command not found

Expected results:
No stderr output.

Additional info:
Having a command named "sdcc-sdcc" seems kind of weird?
Comment 1 Hans de Goede 2007-03-22 03:51:11 EDT
I guess we should patch sdcc to exec helper programs with the full path under
/usr/libexec/sdcc/

Or maybe there already is a configure flag todo this.

> Having a command named "sdcc-sdcc" seems kind of weird?

Agreed, I don't know how the average sdcc using Makefile looks, if it only
invokes sdcc, for both compiling and linking, then it might be a good idea to
rename this, however if it uses multiple sdcc commands its possibly best to
leave this at is, having then Makfile find sdcc, but not the others would only
confuse the user.

Comment 2 Trond Danielsen 2007-03-22 03:57:23 EDT
(In reply to comment #1)
> I guess we should patch sdcc to exec helper programs with the full path under
> /usr/libexec/sdcc/

What if the user wants to run any of the other sdcc-programs before running sdcc?
 
> Or maybe there already is a configure flag todo this.

There is no configure flag to do this atm. The name of the preprocessor is
hard-coded in the SDCCmain.c-file. Changing it to sdcc-sdcpp would be very
simple, and would still work if the user add /usr/libexec/sdcc to his or her path.
 
> > Having a command named "sdcc-sdcc" seems kind of weird?
> 
> Agreed, I don't know how the average sdcc using Makefile looks, if it only
> invokes sdcc, for both compiling and linking, then it might be a good idea to
> rename this, however if it uses multiple sdcc commands its possibly best to
> leave this at is, having then Makfile find sdcc, but not the others would only
> confuse the user.

I agree too, but this was discussed during the review; see bug 226795.
Comment 3 Hans de Goede 2007-03-22 04:32:30 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > I guess we should patch sdcc to exec helper programs with the full path under
> > /usr/libexec/sdcc/
> 
> What if the user wants to run any of the other sdcc-programs before running sdcc?
>  

When I said patch sdcc, I meant the whole package not just the sdcc command
itself, if any of the programs wants to execute others, it should be patched to
be able to find those others even if /usr/libexec/sdcc/ is not in the PATH.

> > Or maybe there already is a configure flag todo this.
> 
> There is no configure flag to do this atm. The name of the preprocessor is
> hard-coded in the SDCCmain.c-file. Changing it to sdcc-sdcpp would be very
> simple, and would still work if the user add /usr/libexec/sdcc to his or her path.
>  

That would be fine too, as long as all the programs can find any needed others

> > > Having a command named "sdcc-sdcc" seems kind of weird?
> > 
> > Agreed, I don't know how the average sdcc using Makefile looks, if it only
> > invokes sdcc, for both compiling and linking, then it might be a good idea to
> > rename this, however if it uses multiple sdcc commands its possibly best to
> > leave this at is, having then Makfile find sdcc, but not the others would only
> > confuse the user.
> 
> I agree too, but this was discussed during the review; see bug 226795.

Yes during the review it was discussed to prefix the program-names with sdcc-
because most of the names are somewhat generic, however the name sdcc is not
generic, so maybe an exception should be made for the sdcc command / program
itself. But as said I think that depends on usage scenario, see my original comment.
Comment 4 Trond Danielsen 2007-03-23 06:08:11 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > I guess we should patch sdcc to exec helper programs with the full path under
> > > /usr/libexec/sdcc/
> > 
> > What if the user wants to run any of the other sdcc-programs before running
sdcc?
> >  
> 
> When I said patch sdcc, I meant the whole package not just the sdcc command
> itself, if any of the programs wants to execute others, it should be patched to
> be able to find those others even if /usr/libexec/sdcc/ is not in the PATH.
> 
> > > Or maybe there already is a configure flag todo this.
> > 
> > There is no configure flag to do this atm. The name of the preprocessor is
> > hard-coded in the SDCCmain.c-file. Changing it to sdcc-sdcpp would be very
> > simple, and would still work if the user add /usr/libexec/sdcc to his or her
path.
> >  
> 
> That would be fine too, as long as all the programs can find any needed others
> 

I did some more testing, and it appares that all of the binaries have hard-coded
names, so modifying everything is out of the question. The solution would
therefore be to add scripts in /usr/bin/that adds /usr/libexec/sdcc to path and
calls the corresponing binary. Any objections to this?
Comment 5 Trond Danielsen 2007-03-23 09:04:31 EDT
I think I have solved the problem, but I would like some feedback before
submitting it to the repos. New spec and srpm at ftp://open-gnss.org/pub/fedora/sdcc
Comment 6 Hans de Goede 2007-03-23 09:54:02 EDT
Looks good, but \"\$*\" should be \"\$@\" AFAIK, otherwise all the arguments to
the script get passed as one argument to the real binary

Also since the whole purpose of the whole libexec exercise was to not polute
/usr/bin with common names I would put /usr/share/sdcc in front of the PATH in
case other packages / make installs with similar names aren't that friendly.
Comment 7 Trond Danielsen 2007-03-27 02:24:28 EDT
New package has been pushed to extras.

Note You need to log in before you can comment on or make changes to this bug.