Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1709 sdcc installation "remember" to much

closed-works-for-me
Borut Ražem
other
5
2014-02-26
2010-11-20
Stefan Olsson
No

Dear Sir or madame

sdcc -v
SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.0 #6035 (Nov 19 2010) (Linux)

release candidate 2

Ubunutu latest version

Some of the directories when entering "sdcc --print-search-dirs --use-non-free" seems to be pointing to the wrong
direcotry (see below).

I downloaded the installation package into /home/stefan/bin/sdcc and made the the
normal steps, ./configure, make , sudo make install

Everything went well but it seems that it remembers the directory where I unpacked the installation.

Is this normal?

Should it not work like this "unpack and make anywhere" and then the "make install"
will install everything in the "system", that is under /usr, /local etc.
without remembering the "unpack directory" into count?

Which file does "sdcc ---print-search-dirs" gets the directories from (so I can change it)

Even if "sudo make install" d othe right thing it still got it wrong,
for example the following directory does not exist

/home/stefan/bin/../share/sdcc/include/mcs51
/home/stefan/bin/../share/sdcc/include
/home/stefan/bin/../share/sdcc/non-free/include/mcs51
/home/stefan/bin/../share/sdcc/non-free/include
/home/stefan/bin/../share/sdcc/lib/small
/home/stefan/bin/../share/sdcc/non-free/lib/small

The following "correct" directory does not exist as well
/usr/local/share/sdcc/non-free/include/mcs51
/usr/local/share/sdcc/non-free/lib/small

I assume that "make install" wrongly put in "/home/stefan" instead of "/usr/local/".

Questions:
Does the "make install" got it worng ?
Where can I change the "/home/stefan" into "/usr/local"
Can I not unpack the distribution whereever I want and "make install" or must it be in "/usr/local" ?
Should there not be anything in the libpath: part of the "sdcc --print-search-dirs --use-non-free" ?

sdcc --print-search-dirs --use-non-free

programs:
/home/stefan/bin
datadir:
/home/stefan/bin/../share
/usr/local/share
includedir:
/home/stefan/bin/../share/sdcc/include/mcs51
/usr/local/share/sdcc/include/mcs51
/home/stefan/bin/../share/sdcc/include
/usr/local/share/sdcc/include
/home/stefan/bin/../share/sdcc/non-free/include/mcs51
/usr/local/share/sdcc/non-free/include/mcs51
/home/stefan/bin/../share/sdcc/non-free/include
/usr/local/share/sdcc/non-free/include
libdir:
/home/stefan/bin/../share/sdcc/lib/small
/usr/local/share/sdcc/lib/small
/home/stefan/bin/../share/sdcc/non-free/lib/small
/usr/local/share/sdcc/non-free/lib/small
libpath:

Discussion

  • Raphael Neider
    Raphael Neider
    2010-11-20

    > Is this normal?

    No, it's not. It should install everything under /usr/local/*. You can change the installation destination using configure --prefix=/whereever/you/want . After make install (with root privileges if using the default prefix of /usr/share!) most of the directories mentioned above should exist.

    > Which file does "sdcc ---print-search-dirs" gets the directories from (so I can change it)

    There is no file containing these paths except for the sdcc binary; you cannot change them (but you can add search paths via -I or -L).

    > .Even if "sudo make install" d othe right thing it still got it wrong,

    SDCC tries to locate its headers and libraries at different places, some relative to the binary, some absolute, some based of configure flags. As it does not hurt that much to look in non-existing places, this behaviour is as intended and usually perfectly fine (except if you have multiple versions of sdcc partially installed in different places, which calls for trouble).

    > I assume that "make install" wrongly put in "/home/stefan" instead of "/usr/local/".

    I assume you have a copy of sdcc installed into $HOME or have placed a wrapper/symlink in $HOME/bin for your convenience? What does which sdcc say? I guess you executed $HOME/bin/sdcc rather than /usr/local/bin/sdcc (or whatever it may be called after installation).

    As to libpath: I do not know, but think its alright the way it is -- the library search path is in libdir ...

    Good luck
    Raphael

     
  • Stefan Olsson
    Stefan Olsson
    2010-11-20

    Dear Raphael

    > As it does not hurt that much to look in non-existing places, this behaviour is
    > as intended and usually perfectly fine (except if you have multiple
    > versions of sdcc partially installed in different places, which calls for trouble).

    That is ok for it to search many places as long as it finds what it needs
    but the "/home/stefan ..." confused me.

    > I assume you have a copy of sdcc installed into $HOME or have placed a wrapper/symlink in $HOME/bin for your convenience'

    No, i have not, the "make install" made a correct installation.
    However the tar created the following directory "/home/stefan/bin/sdcc/sdcc" when I unpacked it into "/home/stefan/bin/sdcc"

    which sdcc
    /usr/local/bin/sdcc

    Regards Stefan

     
  • Borut Ražem
    Borut Ražem
    2011-10-18

    • labels: --> Build system
    • assigned_to: nobody --> borutr
    • status: open --> closed-wont-fix
     
  • Borut Ražem
    Borut Ražem
    2011-10-18

    • status: closed-wont-fix --> pending-works-for-me
     
  • Borut Ražem
    Borut Ražem
    2011-10-18

    > but the "/home/stefan ..." confused me.

    Did you define the --prefix configure option? From what you wrote it seems that you defined --prefix=/home/stefan.
    You shouldn't defile it at all, which means that sdcc will be installed to the default locations: /usr/local/..., or specify the path where you want to install it: --prefix=/usr/local

    Borut

     
  • Maarten Brock
    Maarten Brock
    2014-02-26

    • status: pending-works-for-me --> closed-works-for-me
    • Category: --> other
     
  • Maarten Brock
    Maarten Brock
    2014-02-26

    Without checking again I assume this worked then and still does.
    Closing now.