Shop OBEX P1 Docs P2 Docs Learn Events
propgcc now in the Parallax github - Page 3 — Parallax Forums

propgcc now in the Parallax github

1356711

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2015-03-21 06:39
    I don'the build things as much as you guys do but it seems to me a list of dependencies is more common and having a package carry along all the extra baggage it needs is unusual and a source of problems. I vote for splitting things up.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-22 11:18
    I just pushed an update to the propeller-gcc project to include spinsim in the build. For the time being, I'm hosting spinsim in my github account but I intend to ask Parallax if it is okay to move it to the official Parallax repository. I think propeller-gcc is usable now. It should build gcc, binutils, lib, spin2cpp, spinsim, and propeller-load. The only thing it doesn't currently include is gdb and the demos directory. The demos directory would be easy to add although I should probably go through it to make sure all of the demos actually work. There is more work to be done before gdb can be added as it requires updating to work with the new gcc compiler.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-23 19:22
    Sorry for the quiet from me. David, your latest commit has things working over here again, and much better than before (and faster). I'll have it all in teamcity soon...
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-23 19:26
    Question for you:
    How do I keep the submodules up-to-date? They aren't pulling from branches by default, so I can't run git-pull on them.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-23 20:08
    I've removed propgcc from my path and, unsurprisingly, it fails to cross compile. What I wasn't expecting was complaints about GMP, MPFR, and MPC. I ran make a second time, after the failure, to shorten the output:
    dzweb@zemon1204:~/propgcc5/src$ make CROSS=win32
    Makefile:49: BUILD directory is /var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build
    Makefile:53: PREFIX is /var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build/target
    Makefile:57: INSTALL directory is /opt/parallax
    Makefile:93: OS msys detected.
    Makefile:112: PropGCC version is propellergcc-alpha_v1_9_0_.
    Makefile:116: BugURL is http://code.google.com/p/propgcc/issues.
    Configuring gcc
    configure: WARNING: If you wanted to set the --build type, don't use --host.
        If a cross compiler is detected then cross compile mode will be used.
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... i586-pc-mingw32msvc
    checking target system type... propeller-parallax-elf
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether ln works... yes
    checking whether ln -s works... yes
    checking for a sed that does not truncate output... /bin/sed
    checking for gawk... gawk
    checking for libatomic support... no
    checking for libcilkrts support... no
    checking for libitm support... no
    checking for libsanitizer support... no
    checking for libvtv support... no
    checking for i586-mingw32msvc-gcc... i586-mingw32msvc-gcc
    checking for C compiler default output file name... a.exe
    checking whether the C compiler works... yes
    checking whether we are cross compiling... yes
    checking for suffix of executables... .exe
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether i586-mingw32msvc-gcc accepts -g... yes
    checking for i586-mingw32msvc-gcc option to accept ISO C89... none needed
    checking for i586-mingw32msvc-g++... i586-mingw32msvc-g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether i586-mingw32msvc-g++ accepts -g... yes
    checking whether g++ accepts -static-libstdc++ -static-libgcc... no
    checking for i586-mingw32msvc-gnatbind... no
    checking for gnatbind... no
    checking for i586-mingw32msvc-gnatmake... no
    checking for gnatmake... no
    checking whether compiler driver understands Ada... no
    checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
    checking for objdir... .libs
    checking for the correct version of gmp.h... no
    configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
    Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
    their locations.  Source code for these libraries can be found at
    their respective hosting sites as well as at
    ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
    http://gcc.gnu.org/install/prerequisites.html for additional info.  If
    you obtained GMP, MPFR and/or MPC from a vendor distribution package,
    make sure that you have installed both the libraries and the header
    files.  They may be located in separate packages.
    make: *** [/var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build/gcc/gcc-configured] Error 1
    dzweb@zemon1204:~/propgcc5/src$
    
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 16:03
    Adding PropGCC back to the path did not fix last night's troubles. I've double-checked and the three packages mentioned are installed
    dzweb@zemon1204:~/propgcc5/src$ dpkg-query -l libgmp-dev | grep libgmp-dev
    ii  libgmp-dev                           2:5.0.2+dfsg-2ubuntu1                  Multiprecision arithmetic library developers tools
    dzweb@zemon1204:~/propgcc5/src$ dpkg-query -l libmpfr-dev | grep libmpfr
    ii  libmpfr-dev                          3.1.0-3ubuntu2                         multiple precision floating-point computation developers tools
    dzweb@zemon1204:~/propgcc5/src$ dpkg-query -l libmpc-dev | grep libmpc
    ii  libmpc-dev                           0.9-4                                  multiple precision complex floating-point library development package
    dzweb@zemon1204:~/propgcc5/src$
    
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 16:11
    Did you try the --with-xxx options to tell gcc where to find the libraries?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 16:19
    Does that require editing the makefile to pass them to the correct configure script or is there some way to pass them in as parameters to make? I'm getting
    make: unrecognized option '--with-gmp=/usr/lib/x86_64-linux-gnu'
    make: unrecognized option '--with-mpfr=/usr/lib/x86_64-linux-gnu'
    make: unrecognized option '--with-mpc=/usr/lib/x86_64-linux-gnu'
    
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 16:51
    I'm afraid I haven't tried the --with-xxx options. Here is a link Eric sent me that describes how to use them.

    https://gcc.gnu.org/wiki/InstallingGCC

    However, why not just use the script that comes with gcc to install those libraries under propeller-gcc/gcc?
    cd propeller-gcc/gcc
    ./contrib/download_prerequisites
    
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 16:59
    David Betz wrote: »
    However, why not just use the script that comes with gcc to install those libraries under propeller-gcc/gcc?

    Because I forgot about that. Seems to be working now.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 17:16
    So close! Have you tried cross-compiling for windows yet? Looks like openspin is 99% there...
    dzweb@zemon1204:~/propgcc5/src$ make CROSS=win32
    Makefile:49: BUILD directory is /var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build
    Makefile:53: PREFIX is /var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build/target
    Makefile:57: INSTALL directory is /opt/parallax
    Makefile:93: OS msys detected.
    Makefile:112: PropGCC version is propellergcc-alpha_v1_9_0_.
    Makefile:116: BugURL is http://code.google.com/p/propgcc/issues.
    Building openspin
    make[1]: Entering directory `/var/www/vhosts/david.zemon.name/propgcc5/src/openspin'
    g++ -o openspin -Wall -g -static SpinSource/openspin.o SpinSource/flexbuf.o SpinSource/preprocess.o SpinSource/textconvert.o SpinSource/pathentry.o SpinSource/objectheap.o  PropellerCompiler/libopenspin.a
    make[1]: Leaving directory `/var/www/vhosts/david.zemon.name/propgcc5/src/openspin'
    Installing openspin
    cp: cannot stat `openspin/openspin.exe': No such file or directory
    make: *** [openspin] Error 1
    dzweb@zemon1204:~/propgcc5/src$
    
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 17:29
    So close! Have you tried cross-compiling for windows yet? Looks like openspin is 99% there...
    dzweb@zemon1204:~/propgcc5/src$ make CROSS=win32
    Makefile:49: BUILD directory is /var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build
    Makefile:53: PREFIX is /var/www/vhosts/david.zemon.name/propgcc5/propeller-gcc-win32-build/target
    Makefile:57: INSTALL directory is /opt/parallax
    Makefile:93: OS msys detected.
    Makefile:112: PropGCC version is propellergcc-alpha_v1_9_0_.
    Makefile:116: BugURL is http://code.google.com/p/propgcc/issues.
    Building openspin
    make[1]: Entering directory `/var/www/vhosts/david.zemon.name/propgcc5/src/openspin'
    g++ -o openspin -Wall -g -static SpinSource/openspin.o SpinSource/flexbuf.o SpinSource/preprocess.o SpinSource/textconvert.o SpinSource/pathentry.o SpinSource/objectheap.o  PropellerCompiler/libopenspin.a
    make[1]: Leaving directory `/var/www/vhosts/david.zemon.name/propgcc5/src/openspin'
    Installing openspin
    cp: cannot stat `openspin/openspin.exe': No such file or directory
    make: *** [openspin] Error 1
    dzweb@zemon1204:~/propgcc5/src$
    
    Ummm.... what files are in the openspin directory? Is there any executable generated? Maybe the Makefile for openspin fails to give the executable a .exe extension for Windows?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 17:34
    dzweb@zemon1204:~/propgcc5/src$ ls -alh openspin/
    total 1.3M
    drwxr-xr-x  4 dzweb psacln 4.0K Mar 24 19:17 .
    drwxr-xr-x 11 dzweb psacln 4.0K Mar 23 20:48 ..
    drwxr-xr-x  2 dzweb psacln 4.0K Mar 23 21:08 PropellerCompiler
    drwxr-xr-x  2 dzweb psacln 4.0K Mar 23 21:08 SpinSource
    -rw-r--r--  1 dzweb psacln   76 Mar 21 11:44 .git
    -rw-r--r--  1 dzweb psacln  615 Mar 21 11:44 Makefile
    -rwxr-xr-x  1 dzweb psacln 1.3M Mar 24 19:17 openspin
    -rw-r--r--  1 dzweb psacln 1.5K Mar 21 11:44 openspin.sln
    -rw-r--r--  1 dzweb psacln  975 Mar 21 11:44 PropellerCompiler.sln
    -rw-r--r--  1 dzweb psacln 1.8K Mar 21 11:44 README.md
    dzweb@zemon1204:~/propgcc5/src$
    

    Yep, looks like the Makefile isn't adding the .exe extension
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 17:35
    FYI, I must moved propgcc to the Parallax github account along with spinsim and spinwrap. You will no longer find them in my github account. However, propeller-gcc is still in my account while we work on stabilizing it.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 17:41
    David Betz wrote: »
    FYI, I must moved propgcc to the Parallax github account along with spinsim and spinwrap. You will no longer find them in my github account. However, propeller-gcc is still in my account while we work on stabilizing it.

    Good to know. I'm certainly less interested in making the old propgcc work in teamcity now that the new version is becoming stable.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 17:43
    dzweb@zemon1204:~/propgcc5/src$ ls -alh openspin/
    total 1.3M
    drwxr-xr-x  4 dzweb psacln 4.0K Mar 24 19:17 .
    drwxr-xr-x 11 dzweb psacln 4.0K Mar 23 20:48 ..
    drwxr-xr-x  2 dzweb psacln 4.0K Mar 23 21:08 PropellerCompiler
    drwxr-xr-x  2 dzweb psacln 4.0K Mar 23 21:08 SpinSource
    -rw-r--r--  1 dzweb psacln   76 Mar 21 11:44 .git
    -rw-r--r--  1 dzweb psacln  615 Mar 21 11:44 Makefile
    -rwxr-xr-x  1 dzweb psacln 1.3M Mar 24 19:17 openspin
    -rw-r--r--  1 dzweb psacln 1.5K Mar 21 11:44 openspin.sln
    -rw-r--r--  1 dzweb psacln  975 Mar 21 11:44 PropellerCompiler.sln
    -rw-r--r--  1 dzweb psacln 1.8K Mar 21 11:44 README.md
    dzweb@zemon1204:~/propgcc5/src$
    

    Yep, looks like the Makefile isn't adding the .exe extension
    Unfortunately, I am not a contributor to the openspin repository so I can't fix that.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 17:44
    Yep, looks like the Makefile isn't adding the .exe extension

    A quick look at OpenSpin's Makefile and it appears it isn't set up for cross-compilation at all :(
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 17:52
    A quick look at OpenSpin's Makefile and it appears it isn't set up for cross-compilation at all :(
    Yes, I imagine that is true. I don't think the spin2cpp Makefile is either although Eric has said he will fix that. I guess that is one disadvantage of pulling code from the official repositories. It means that you are working with code you don't control. I guess I should ask Roy about adding cross compilation support to the openspin Makefile as well.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-24 18:03
    David Betz wrote: »
    Yes, I imagine that is true. I don't think the spin2cpp Makefile is either although Eric has said he will fix that. I guess that is one disadvantage of pulling code from the official repositories. It means that you are working with code you don't control. I guess I should ask Roy about adding cross compilation support to the openspin Makefile as well.
    I just got permission to update the openspin Makefile to support cross compilation. Unfortunately, I won't be able to do it tonight. I'll try to get it done tomorrow.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 18:10
    Great! :)

    64-bit linux distro is getting close to functional and published. Hopefully I can fix the issue I'm running into with teamcity before the night is out...
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-24 18:52
    Ah, finally found the issue. Same problem as we had in propgcc with bin2c.c. Pull request started
    https://github.com/dbetz/propeller-load/pull/1
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-25 04:26
    Ah, finally found the issue. Same problem as we had in propgcc with bin2c.c. Pull request started
    https://github.com/dbetz/propeller-load/pull/1
    I think, rather than fixing bin2c, I may just remove the need for it. I'll try to get that done tonight.

    Edit: Yes, it looks like bin2c can be replaced by;
    propeller-elf-objcopy -I binary -O elf32-propeller <infile> <outfile>
    
    This requires a bit of work changing the internal symbols used to refer to the binary blob but shouldn't be too difficult.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-25 05:00
    David Betz wrote: »
    I think, rather than fixing bin2c, I may just remove the need for it. I'll try to get that done tonight.

    Edit: Yes, it looks like bin2c can be replaced by;
    propeller-elf-objcopy -I binary -O elf32-propeller <infile> <outfile>
    
    This requires a bit of work changing the internal symbols used to refer to the binary blob but shouldn't be too difficult.
    Ummm... It isn't quite as easy as that I guess. The command I gave above will create a Propeller object file but I need an x86 object file that I can link with other host objects. I'll have to see if there is an x86 build of objcopy available on all of our platforms.
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-25 05:11
    Ah, finally found the issue. Same problem as we had in propgcc with bin2c.c. Pull request started
    https://github.com/dbetz/propeller-load/pull/1
    Because I won't be able to get to switching over to objcopy until tonight, I've merged your change to bin2c to unblock your build.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-25 05:57
    David Betz wrote: »
    Because I won't be able to get to switching over to objcopy until tonight, I've merged your change to bin2c to unblock your build.

    Thanks.

    And... now... the seemly impossible task. How do we get the root project to update its children? If you take a look at the commit hashes, propeller-gcc is still pointing to the "old" version of propeller-load without my fix. The branch/commit information isn't stored in /.gitmodules, since that just contains a URL and local path. It doesn't *appear* to be stored in /.git/config since that just has a module name and URL. I'm lost :(
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-25 06:00
    Thanks.

    And... now... the seemly impossible task. How do we get the root project to update its children? If you take a look at the commit hashes, propeller-gcc is still pointing to the "old" version of propeller-load without my fix. The branch/commit information isn't stored in /.gitmodules, since that just contains a URL and local path. It doesn't *appear* to be stored in /.git/config since that just has a module name and URL. I'm lost :(
    Try this:
    git submodule update --remote
    
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-25 06:05
    Brings up usage for git submodule.

    Looks like maybe the submodules could be removed and then re-added with this instead
    git submodule add -b master
    
    (based on this SO answer)


    DOH!
    dzweb@zemon1204:~/propgcc5/src$ git --version
    git version 1.7.9.5
    dzweb@zemon1204:~/propgcc5/src$
    
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-25 06:11
    Brings up usage for git submodule.

    Looks like maybe the submodules could be removed and then re-added with this instead
    git submodule add -b master
    
    (based on this SO answer)


    DOH!
    dzweb@zemon1204:~/propgcc5/src$ git --version
    git version 1.7.9.5
    dzweb@zemon1204:~/propgcc5/src$
    
    I'm using this version:
    Davids-MacBook-Air-2:propeller-gcc dbetz$ git --version
    git version 1.9.5 (Apple Git-50.3)
    
  • David BetzDavid Betz Posts: 14,516
    edited 2015-03-25 06:12
    By the way, you should also be able to do this:
    cd propeller-load
    git pull
    git merge
    
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-25 06:47
    I'm working on updating git.
    David Betz wrote: »
    By the way, you should also be able to do this:
    cd propeller-load
    git pull
    git merge
    

    I'd like to avoid that. The more automated the better.
Sign In or Register to comment.