You are not logged in.

#1 2020-10-16 20:23:22

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

[Solved] 'MAKEFILE' doesn't find custom gcc

Hallo,
i have a makefile with:

CC = avr-gcc
CPP = avr-g++

When i install 'avr-gcc' package the compiler binary will be found and build is fine. The unpatched GNU GCC implementation for AVR is not very good though so i compiled the arduino one, put it in my home folder and exported a path to the binary. I can invoke the compiler successfully in bash but when i do 'make' i get:

make: avr-gcc: No such file or directory

Why is the binary not found?
Why the is the PATH env (set in .bashrc) not honored?
How is 'avr-gcc' package doing it?

Last edited by Maniaxx (2020-10-16 20:59:49)


sys2064

Offline

#2 2020-10-16 20:43:28

koffeinfriedhof
Member
Registered: 2017-11-30
Posts: 89

Re: [Solved] 'MAKEFILE' doesn't find custom gcc

Hi!

You can check variables via Makefile too:

CC = avr-gcc
env:
	$(info $$CC is [${CC}])
        $(info $$PATH is [${PATH}])

Running `make env` would output the variables as known to make.

Offline

#3 2020-10-16 20:59:35

Maniaxx
Member
Registered: 2014-05-14
Posts: 738

Re: [Solved] 'MAKEFILE' doesn't find custom gcc

Nice trick, thanks. And led to the culprit indeed. I exported my path with ~ instead of /home/user. Bad habit (but shorter) smile. It works in bash but not for MAKE. Expanding it properly in PATH fixed the bug.

Thanks!

Last edited by Maniaxx (2020-10-16 21:00:53)


sys2064

Offline

Board footer

Powered by FluxBB