Shop OBEX P1 Docs P2 Docs Learn Events
GCC status - Page 2 — Parallax Forums

GCC status

2»

Comments

  • I may be biased, but I'd recommend doing it this way: https://forums.parallax.com/discussion/168418/building-propgcc-with-docker
  • Dave Hein wrote: »
    I downloaded Eric's gcc-propeller project. Now how do I build it on my Linux machine? It's been years since I built PropGCC, and it was under Cygwin. I recall having to run some type of config tool first, and then running make, but I can't figure out which directory to do this from.
    Try cloning my propeller-gcc project. It has a README.md file that says how to make it. It will build gcc, binutils, and the libraries.
  • Its pretty common to see this as the standard build script

    ./configure
    make all
    sudo make install

    which is pretty much standard. The 'all' is not always needed but shouldn't hurt. The install step updates
    system directories if you want to install fully, but once you have a binary it should normally just run,

    ./bin/xxxxxxx

    or some such
  • I followed the instructions in the Propgcc-docs project. It has build instructions for the various platforms.

    Mike
  • yetiyeti Posts: 818
    edited 2019-01-16 11:24
    Mark_T wrote: »
    Its pretty common to see this as the standard build script

    ./configure
    make all
    sudo make install

    which is pretty much standard. The 'all' is not always needed but shouldn't hurt. The install step updates
    system directories if you want to install fully, but once you have a binary it should normally just run,

    ./bin/xxxxxxx

    or some such
    Don't distribute such dangerous recipes!
    This might end in overwriting system binaries.

    And "./bin/xxxxxxx" would start a binary "$CurrentDir/bin/xxxxxxx" so it doesn't match installing into the system's directories.

    Read the documentation and ask...

    That's safer!
  • Those instructions look like what I did a few years ago. I'm not sure how dangerous this recipe is, but the first two steps are safe. The build is done in local directories.

    I ran configure, and it failed almost immediately because I didn't have g++. I installed that and now it fails on gmp.h. I'll do a search to see how to get that.
  • If a package has a install step, it will install into a sensible place, and remember this is optional

    ./bin/xxxx
    is for running the binary without installing, to test, or most commonly because you have several
    versions of something in different directories so you can compare them - you wouldn't normally
    install during development for instance.

    If you use sudo, you are assumed to know what you are doing...
  • yetiyeti Posts: 818
    edited 2019-01-16 14:28
    Mark_T wrote: »
    If a package has a install step, it will install into a sensible place, and remember this is optional
    If you want PropGCC and remember someone said it needs TeXinfo4 and then you do "configure/make/install" from TeXinfo4 sources because your OS inly has the newer teXinfo it'll overwrite the system's TeXinfo parts without the system packaging taking notice of this.

    And lots more of such examples about what can go wrong with simply trusting "configure/make/install" hints are known.

    JUST DON'T DO THIS!
    JUST DON'T TEACH THIS!

    Find out how to install the wanted software into a path not needing superuser powers.

    E.g. 1st make a directory "/opt/parallax" and transfer the ownership of it to an account for managing software with lowered rights and then no further step installing something into "/opt/parallax" will need superpowers.

    Look for "PREFIX=...", "--prefix=...", "DESTDIR=..." and other hints how to configure the install path. If all else fails, start to read "Makefile"s. Do not ever rely on such short recipes like: Just type "configure/make/install" with some parts of it as root.

    Thay may work by accident or cause accidents that you just do not see...
  • Dependencies are another ballgame. I thought we were starting with the assumption theres some software not
    already packaged up for a package manager...
Sign In or Register to comment.