Shop OBEX P1 Docs P2 Docs Learn Events
Issue 64: propgcc (binutils ) does not build on latest Mac OS X (10.9 Mavericks) — Parallax Forums

Issue 64: propgcc (binutils ) does not build on latest Mac OS X (10.9 Mavericks)

dgatelydgately Posts: 1,630
edited 2014-01-04 22:06 in Propeller 1
Posted an issue for this at: https://code.google.com/p/propgcc/issues/detail?id=64

Since OS X Mavericks (10.9) now uses clang for compiles, binutils versions older than 2.24 will not compile because of a number of deprecated symbols & functions. Not sure if just updating binutils in the propgcc project to the 2.24 version will fix all problems but it's a start...


Thanks,
dgately

Comments

  • David BetzDavid Betz Posts: 14,516
    edited 2013-12-31 12:34
    dgately wrote: »
    Posted an issue for this at: https://code.google.com/p/propgcc/issues/detail?id=64

    Since OS X Mavericks (10.9) now uses clang for compiles, binutils versions older than 2.24 will not compile because of a number of deprecated symbols & functions. Not sure if just updating binutils in the propgcc project to the 2.24 version will fix all problems but it's a start...


    Thanks,
    dgately
    This isn't a good solution but you can get around this problem by running this command before running the jbuild.sh script:
    export CFLAGS="\
    -Wno-string-plus-int \
    -Wno-deprecated-declarations \
    -Wno-empty-body \
    -Wno-self-assign \
    -Wno-sometimes-uninitialized"
    
  • dgatelydgately Posts: 1,630
    edited 2013-12-31 13:19
    propgccCompileLog.txt
    David Betz wrote: »
    export CFLAGS="\
    -Wno-string-plus-int \
    -Wno-deprecated-declarations \
    -Wno-empty-body \
    -Wno-self-assign \
    -Wno-sometimes-uninitialized"
    

    Yeah, tried that... Then I get:
    3 warnings and 12 errors generated.
    make[2]: *** [cplus-dem.o] Error 1
    make[1]: *** [all-libiberty] Error 2
    make: *** [all] Error 2
    binutils make failed.
    

    Error portion of the build log is attached.

    Thanks,
    dgately
  • David BetzDavid Betz Posts: 14,516
    edited 2013-12-31 13:23
    dgately wrote: »
    propgccCompileLog.txt

    Yeah, tried that... Then I get:
    3 warnings and 12 errors generated.
    make[2]: *** [cplus-dem.o] Error 1
    make[1]: *** [all-libiberty] Error 2
    make: *** [all] Error 2
    binutils make failed.
    

    Error portion of the build log is attached.

    Thanks,
    dgately
    I'm not sure what that's all about. Are you building the default branch from Google Code? I know that will build under Mavericks since that's what I'm working on. I had thought that the release_1_0 branch would work as well. I did have to fix a bug in one of the gdb files in both branches but the errors you showed don't look like they were caused by that bug.
  • dgatelydgately Posts: 1,630
    edited 2014-01-02 08:39
    Yes, it's the default branch. I cloned the whole diet again just to be sure and ran 'hg branch' which displays 'default'...
  • David BetzDavid Betz Posts: 14,516
    edited 2014-01-02 08:53
    dgately wrote: »
    Yes, it's the default branch. I cloned the whole diet again just to be sure and ran 'hg branch' which displays 'default'...
    It's hard to know what's going wrong. I just checked and I've installed all OS X and Xcode updates. Are you completely up to date?
  • dgatelydgately Posts: 1,630
    edited 2014-01-02 10:59
    David Betz wrote: »
    It's hard to know what's going wrong. I just checked and I've installed all OS X and Xcode updates. Are you completely up to date?

    Oh yeah, my MacBook Pro is always quite up-to-date in those respects. I'm not positive, but it seems these compile problems with propgcc started not when I upgraded to 10.9 and XCode 5, but when I started my iPad/iPhone Prop IDE development. Possibly something to do with using the 10.9 SDk? I've tried to reset my SDK to 10.8 for command-line compiles, but I have no idea if that is mod is really happening...

    I'm a bit clueless here...

    dgately
  • dgatelydgately Posts: 1,630
    edited 2014-01-02 13:46
    I'm seeing that the build process is ignoring this set of exports:
    $ export CFLAGS="\
    -Wno-string-plus-int \
    -Wno-deprecated-declarations \
    -Wno-empty-body \
    -Wno-self-assign \
    -Wno-sometimes-uninitialized"
    
    $ echo $CFLAGS
    -Wno-string-plus-int -Wno-deprecated-declarations -Wno-empty-body -Wno-self-assign -Wno-sometimes-uninitialized
    

    Outside of just exec'ing that on the command-line, I've put it in a file which I 'source' just before compiling. But I notice that the errors include infractions that should be ignored:
    gcc -DHAVE_CONFIG_H -I. -I../../../propgcc/binutils/gas  -I. -I../../../propgcc/binutils/gas -I../bfd -I../../../propgcc/binutils/gas/config -I../../../propgcc/binutils/gas/../include -I../../../propgcc/binutils/gas/.. -I../../../propgcc/binutils/gas/../bfd -DLOCALEDIR="\"/opt/parallax/share/locale\""  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT dwarf2dbg.o -MD -MP -MF .deps/dwarf2dbg.Tpo -c -o dwarf2dbg.o ../../../propgcc/binutils/gas/dwarf2dbg.c
    ../../../propgcc/binutils/ld/plugin.c:428:10: error: explicitly assigning a variable of type 'const void *' to itself [-Werror,-Wself-assign]   [B] <== Why?[/B]
      handle = handle;
      ~~~~~~ ^ ~~~~~~
    ../../../propgcc/binutils/ld/plugin.c:429:8: error: explicitly assigning a variable of type 'struct ld_plugin_input_file *' to itself [-Werror,-Wself-assign]   [B]<== Why?[/B]
      file = file;
      ~~~~ ^ ~~~~
    ../../../propgcc/binutils/ld/plugin.c:438:10: error: explicitly assigning a variable of type 'const void *' to itself [-Werror,-Wself-assign]   [B]<== Why?[/B]
      handle = handle;
      ~~~~~~ ^ ~~~~~~
    3 errors generated.
    

    Is there a config file (since the Makefile is built by ./configure) or another file where I need to embed these exports?

    This is consuming me... :frown:

    Thanks,
    dgately
  • David BetzDavid Betz Posts: 14,516
    edited 2014-01-02 14:38
    I just build with the following commands:
    source warnings.sh
    ./jbuild.sh 5 rm-all
    
    That seems to work for me. The warnings.sh file just contains the command for setting CFLAGS.
  • dgatelydgately Posts: 1,630
    edited 2014-01-03 20:30
    Well... After walking away from the problem for a day, I figured it out. :innocent:

    I have been building with "sudo ./jbuild.sh 5 em-all" all of this time, thinking that my exec'ing "source fixBuildWarnings.sh" as my user would work. Of course 'sudo' was causing the build to take place as root and root had not exported the changes to CFLAGS... I needed to use 'sudo' to build as I keep getting permissions issues, but that was masking the issue. I'll need to look into the permissions problems, but can get around the problem for now.

    To test, I exec'd "sudo su -", then "source fixBuildWarnings.sh" as root and "./jbuild.sh 5 em-all". It's now happily building propgcc!


    Back to working on other things...

    Thanks for your help!

    dgately
  • David BetzDavid Betz Posts: 14,516
    edited 2014-01-04 04:22
    dgately wrote: »
    Well... After walking away from the problem for a day, I figured it out. :innocent:

    I have been building with "sudo ./jbuild.sh 5 em-all" all of this time, thinking that my exec'ing "source fixBuildWarnings.sh" as my user would work. Of course 'sudo' was causing the build to take place as root and root had not exported the changes to CFLAGS... I needed to use 'sudo' to build as I keep getting permissions issues, but that was masking the issue. I'll need to look into the permissions problems, but can get around the problem for now.

    To test, I exec'd "sudo su -", then "source fixBuildWarnings.sh" as root and "./jbuild.sh 5 em-all". It's now happily building propgcc!


    Back to working on other things...

    Thanks for your help!

    dgately
    I'm glad to hear that you got your build working! I hate to say this because I'm sure it is bad practice but I get around the permissions problems by creating /opt/parallax and setting it to be writable by everyone.
  • dgatelydgately Posts: 1,630
    edited 2014-01-04 11:31
    David Betz wrote: »
    I'm glad to hear that you got your build working! I hate to say this because I'm sure it is bad practice but I get around the permissions problems by creating /opt/parallax and setting it to be writable by everyone.

    Yeah, funny you can either create /opt/parallax as writable by everyone or you can 'sudo su -' to get builds to work. Neither feels right :thumb: !

    Since it's my developer Mac and used by just me, I'll most likely do what you have done and set that directory and its content to writable by everyone. Oh, the perils of working below the UI...

    And to add to that, it seems just wrong to have to ignore all those warnings as well... But alas, we must move on!

    I'll live.


    dgately
  • potatoheadpotatohead Posts: 10,261
    edited 2014-01-04 22:06
    Setting the permissions makes perfect sense. It's for development.

    Users can also just create and use ~/opt/parallax as well.

    Or a special user account that owns the development can be used...

    All trade-offs.

    Given it's a development environment, making it writable by all makes sense, because it's simple and consistent.
Sign In or Register to comment.