PD Compiler doesn't seem to work

Hi,

I think there’s still an issue with the PD compiler. Whatever I try to compile, the linker gives me the following error:

/tmp/ccWHC19B.ltrans1.ltrans.o: In function'cBinop_k_onMessage.constprop.13':
<artificial>:(.text+0x40): undefined reference to 'alloca'
/tmp/ccWHC19B.ltrans1.ltrans.o: In function 'hv_vscheduleMessageForReceiver.constprop.11':
<artificial>:(.text+0xb4): undefined reference to 'alloca'
collect2: error: ld returned 1 exit status
make: *** [/tmp/owl-build-WAxB2n/patch.elf] Error 1
ERROR: Patch build failed.

I downloaded the OwlProgram and it gives me the same error. I can compile and run C++ code but not PD.
I tried some patches in the gallery, the template, even an [adc~] and [dac~] with nothing else in the patch.

The arm-none-eabi-gcc -v command gives me:
gcc version 4.9.3 20150529 (prerelease) (15:4.9.3+svn227297-1)
I also tried the 5.2.1 gcc but the error output was so big that I didn’t bother to search for the errors. :slight_smile:

It seems like a Makefile problem but I can’t figure it out. Tomorrow is another day.

I can confirm I’m getting the same error. They’ve recently updated the Heavy compiler, I think I need to bring the Makefile into line.

I’ve pushed some changes to the master branch which fixes this problem and brings us up to date with the latest Heavy utilities.

It turns out alloca must be defined as this for gcc arm to be happy (I’ve no idea why):
#define hv_alloca(_n) __builtin_alloca(_n)

I’ve also deployed the changes to the server and have tested that the PD template patch builds ok, so it should all be good to go.

Note that at the moment, building a PD patch locally first time usually requires calling the make command twice. If you see lots of errors like undefined reference to hv_owl_new it is because the files generated by Heavy have not been pulled into the dependencies yet, and so have not been compiled. I’d like to fix this in a future re-haul of the Makefile, but I think it will require a recursive make.

It works! Thanks a lot.

Yes, I noticed those errors. Duplicating the last line on the Makefile (@make $(PATCH_OBJS)) doesn’t complain any more :smiley: Not pretty but it works.

No, it doesn’t. Once the object files are compiled the make command works without errors. That confused me.

Is this issue resolved in the meantime, e.g. the compiler is working now?

Yes, it does! :wink:

The master branch of OwlProgram now has a much improved build. No need to run heavy compilations twice. And you no longer have to specify the extra ‘heavy’ target - just make HEAVY=patchname.pd patch|web|run|store will do.

It’s a fairly big change, if you encounter any issues let me know.

1 Like

Just got the next error while trying to compile my pd patch (https://hoxtonowl.com/patch-library/patch/Granular_delay) for owl in the online compiler.

Traceback (most recent call last): File "./Tools/Heavy/uploader.py", line 464, in <module> main() File "./Tools/Heavy/uploader.py", line 456, in main token=args.token) File "./Tools/Heavy/uploader.py", line 365, in upload except requests.ConnectTimeout as e: AttributeError: 'module' object has no attribute 'ConnectTimeout' make[1]: *** [/tmp/owl-build-MAIXN9/Source/Heavy_owl.h] Error 1 make: *** [heavy] Error 2 ERROR: Patch build failed.

At first I thought it’s a fully complier related error but then I tried with another patch and it worked just fine. Is the patch too heavy or something?

Solved.

The compiler didn’t like it when I connected multiple sources in the same delay line.