Bug 233385 - sdcc: sdcpp command not fonud
Summary: sdcc: sdcpp command not fonud
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sdcc
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Trond Danielsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-21 23:30 UTC by Scott Tsai
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 2.6.0-9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-27 06:24:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Scott Tsai 2007-03-21 23:30:21 UTC
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 07:51:11 UTC
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 07:57:23 UTC
(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 08:32:30 UTC
(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 10:08:11 UTC
(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 13:04:31 UTC
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 13:54:02 UTC
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 06:24:28 UTC
New package has been pushed to extras.


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