[En-Nut-Discussion] Can't correctly build NutOS 4.8.9 on Fedora 14 for Ethernut 2.1b
harald.kipp at egnite.de
Mon Apr 18 18:21:55 CEST 2011
On 4/18/2011 5:46 PM, Bernard Fouché wrote:
> It can be the environment: I run lua 5.1.4-7 instead of a 5.0.Y.
I should have been more precise: I meant the environment variables. Let's stay with your Lua version and all the rest. Do not change anything.
> when I run 'make all' into ~/ethernut/nutbld, all the
> avr-gcc options you show are missing:
> [bernard at linuxbf2 nutbld]$ make all
> make -C arch
> make: Entering directory `/home/bernard/ethernut/nutbld/arch'
> avr-gcc -c -o avr/os/context_gcc.o
> /home/bernard/ethernut/nut/arch/avr/os/context_gcc.c:114:20: error:
> cfg/os.h: No such file or directory
Yes, this is what I noticed too. We will now step by step try to find out, where they are gone.
> There are spaces between 'avr-gcc'& '-c' like some options values where
> replaced by an empty space.
Not really, because the spaces are before -c while the missing options should appear after -c.
> I also tried 'chmod 0 /usr/bin/lua ; chmod 0 /usr/lib/liblualib-5.1.so
> ;' and then './configure'. Again the compilation in 'nutbld' gives the
> same results.
Trial and error is one possibility, and quite useful if you feel lost in an alien system. In this case, I prefer to find the cause. So please do not waste your time to play around with trials.
> What do you have in ~/ethernut/nutbld/NutConf.mk ? Here I just have:
What you have looks OK to me.
> Hence I don't understand how avr-gcc could be aware of all the command
> line options that you show when you build on your computer,
Exactly this I will try to find out now. In a first step 'make' will consult the Makerules. Lets examine nutbld/arch/Makefile. Can you please post its contents? To save space, better exclude the long SRSC list, e.g.
--- SNIP ---
# Do not edit! Automatically generated on Fri Jul 16 12:38:57 2010
PROJ = libnutarch
top_srcdir = ?
top_blddir = ?
VPATH = $(top_srcdir)/arch
...SCRS list removed
OBJS = $(SRCS:.c=.o)
all: $(PROJ).a $(OBJS)
$(CP) $(PROJ).a ?/lib/$(PROJ).a
clean: cleancc cleanedit
-rm -f $(PROJ).a
--- SNAP ---
$(top_srcdir)/Makerules.avr-gcc contains the rule we are looking for.
%o : %c
$(CC) -c $(CPFLAGS) $(INCFIRST) -I$(INCDIR) $(INCLAST) $< -o $@
As you can see, there is our missing option option -I. The variables INCDIR and CPLAGS are found in $(top_srcdir)/Makedefs.avr-gcc.
Now I'm quite curious about your Makefile.
More information about the En-Nut-Discussion