Shop OBEX P1 Docs P2 Docs Learn Events
Flexspin compiler error - maybe? — Parallax Forums

Flexspin compiler error - maybe?

pmrobertpmrobert Posts: 677
edited 2024-05-18 00:08 in C/C++

A program I've been working on started throwing this type of error message a few weeks ago. I did think initially it was a self-generated error but after trying quite a few attempts at remedying the issue I went back to sample code from the authors of flexspin and was able to replicate the issue. My impression is that the errors are from the compiler itself. This is running on Ubuntu 22.04, machine has plenty of memory. Anyone have any ideas?

Here's the compiler output:
"/home/pmrobert/oip2/flexprop/bin/flexspin" -2 -l --tabs=4 -D_BAUD=230400 -O1 --charset=utf8 -I "/home/pmrobert/flexprop/include" "/home/pmrobert/oip2/flexprop/samples/shell/shell.c"
Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2024 Total Spectrum Software Inc. and contributors
Version 6.9.7-beta-HEAD-v6.9.7 Compiled on: May 17 2024
error: Pointer does not reference memory
error: Pointer does not reference memory
error: Pointer does not reference memory
shell.c
|-psram.spin2
|-|-psram4drv-dualCE.spin2
opendir.c
fs9p_vfs.c
|-fs9p_internal.cc
fatfs_vfs.c
|-fatfs.cc
parallaxfs_vfs.c
|-parallaxfs_internal.cc
|-|-flash_fs.spin2
lfs_spi_vfs.c
|-lfswrapper.cc
|-|-SpiFlash.spin2
mount.c
fmt.c
posixio.c
exec.c
fputs.c
sprintf.c
fgets.c
fopen.c
perror.c
rename.c
strcmp.c
strrchr.c
ctype.c
stat.c
_mount.c
basicfmt.c
errno.c
vfs.c
memcmp.cimal
strchr.c
sdmm.cc
time.c
localtim.c
malloc.c
bufio.c
strcspn.c
strspn.c
memcmp.c
strchr.c
malloc.c
lfs_util.c
bufio.c
isatty.c
fileno.c
malloc.c
strerror.c
dofmt.c
vfs.c
fmt.c
stat.c
posixio.c
strncpy.c
strncat.c
strncmp.c
strncmp.c
strrchr.c
malloc.c
getenv.c
gettimeofday.c
ctype.c
malloc.c
bufio.c
ioctl.c
ieee32.c
bufio.c
strncmp.c
child process exited abnormally
Finished at Fri May 17 19:58:16 2024

Comments

  • Try rolling back a few compiler versions, current versions may or may not be a bit funny.

  • ersmithersmith Posts: 6,068

    @pmrobert : Yes, that is (unfortunately) a compiler bug -- in fixing one bug, I introduced another in what seemed like completely unrelated code. It should be fixed in 6.9.8, which comes from the release/v6.9 branch on github.

  • @ersmith git master still can't build the shell example

  • ersmithersmith Posts: 6,068

    @Wuerfel_21 said:
    @ersmith git master still can't build the shell example

    It seems to work for me. What error are you getting?

  • Same as OP. I even did make clean to make sure it's all updated

  • ersmithersmith Posts: 6,068

    @Wuerfel_21 said:
    Same as OP. I even did make clean to make sure it's all updated

    I just did a fresh checkout from github in a new directory, and that works too, so I didn't forget to push anything. The fix for OP's build problem is in 59ca49fc, and current top of master is a12af4ab ("Fix parsing of Spin2_vNN directive"). Are you sure you're not on a branch or tag?

  • Ahh, so here's the problem: since the shell is in flexprop's example directory, which also contains a spin2cpp/build directory, I managed to use that by forgetting one layer of "../". That does mean that flexprop's submodule is outdated though, I guess.

  • ersmithersmith Posts: 6,068

    @Wuerfel_21 said:
    Ahh, so here's the problem: since the shell is in flexprop's example directory, which also contains a spin2cpp/build directory, I managed to use that by forgetting one layer of "../". That does mean that flexprop's submodule is outdated though, I guess.

    That explains it. flexprop doesn't get updated all that often, so "flexprop's submodule is outdated" is usually true :).

  • pmrobertpmrobert Posts: 677
    edited 2024-05-20 16:11

    The most recent version (6.9.8) works just fine - thank you very much! Tangentially the script I use to update the flex* install is:

    sudo apt -y update
    sudo apt -y upgrade
    cd $HOME
    mkdir -p src
    cd src
    rm -rf flexprop
    git clone --recursive https://github.com/totalspectrum/flexprop
    cd flexprop
    make install INSTALL=~/oip2/flexprop
    ./bin/flexspin --version

    Any suggestions to improve it would be gladly accepted.

    Mike R...

  • instead of deleting and re-cloning, you can

    git pull
    git submodule update
    make clean
    

    to the same effect

Sign In or Register to comment.