[syslinux] build problems with 6.04-pre1

balducci at units.it
Sat, 05 Mar 2016 11:01:20 -0000

hello everybody,

apologies if I'm missing something here

Just tried to build 6.04-pre1 test version with:

     make bios installer

and found some problems all (seemingly) related to inaccurate paths in
various Makefiles.

I enclose a complete patch at the end of this email, which details the
problems I found and how they got fixed for me.

As an example, this is the first error I got:

---8<---
make[3]: Entering directory
'/home/balducci/tmp/install-us-d/syslinux-6.03.d/syslinux-6.04-pre1/libinstaller'
make[3]: *** No rule to make target
'/home/balducci/tmp/install-us-d/syslinux-6.03.d/syslinux-6.04-pre1/libinstaller/../core/ldlinux.bss',
needed by 'bootsect_bin.c'.  Stop.
make[3]: Leaving directory
'/home/balducci/tmp/install-us-d/syslinux-6.03.d/syslinux-6.04-pre1/libinstaller'
/home/balducci/tmp/install-us-d/syslinux-6.03.d/syslinux-6.04-pre1/Makefile:310:
recipe for target 'installer' failed
make[2]: *** [installer] Error 2
make[2]: Leaving directory
'/home/balducci/tmp/install-us-d/syslinux-6.03.d/syslinux-6.04-pre1'
Makefile:102: recipe for target 'bios' failed
make[1]: *** [bios] Error 2
make[1]: Leaving directory
'/home/balducci/tmp/install-us-d/syslinux-6.03.d/syslinux-6.04-pre1'
---8<---

which for me is cured by (see enclosed complete patch below):

---8<---
--- syslinux-6.04-pre1-BROKEN/libinstaller/Makefile.ORIG	2016-03-05
10:30:53.878913729 +0100
+++ syslinux-6.04-pre1-BROKEN/libinstaller/Makefile	2016-03-04
17:04:17.927473149 +0100
@@ -8,23 +8,24 @@ VPATH = $(SRC)

 all: installer

-bootsect_bin.c: $(OBJ)/../core/ldlinux.bss bin2c.pl
+bootsect_bin.c: $(OBJ)/../bios/core/ldlinux.bss bin2c.pl
 	$(PERL) $(SRC)/bin2c.pl syslinux_bootsect < $< > $@

---8<---

Another kind of error was the failure to find some headers (eg
version.h): this was fixed by tweaking the INCLUDES variable in some
Makefiles (see enclosed patch).

I'm not sure my fixes are correct, but it seems to me that _some_ fix is
needed.

thanks a lot for your valuable work

ciao
gabriele


Complete patch
=============

--- syslinux-6.04-pre1-BROKEN/mtools/Makefile.ORIG	2016-03-04 17:07:14.696050599
+0100
+++ syslinux-6.04-pre1-BROKEN/mtools/Makefile	2016-03-05 10:34:14.235228580
+0100
@@ -1,7 +1,7 @@
 include $(MAKEDIR)/syslinux.mk

 OPTFLAGS = -g -Os
-INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libfat -I$(SRC)/../libinstaller
+INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../bios -I$(SRC)/../libfat
-I$(SRC)/../libinstaller
 CFLAGS	 = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
 LDFLAGS	 =

--- syslinux-6.04-pre1-BROKEN/linux/Makefile.ORIG	2016-03-04 17:17:12.586189283
+0100
+++ syslinux-6.04-pre1-BROKEN/linux/Makefile	2016-03-04 17:17:44.866281543 +0100
@@ -17,7 +17,7 @@
 include $(MAKEDIR)/syslinux.mk

 OPTFLAGS = -g -Os
-INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller
+INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../bios -I$(SRC)/../libinstaller
 CFLAGS	 = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
 LDFLAGS	 =

--- syslinux-6.04-pre1-BROKEN/libinstaller/Makefile.ORIG	2016-03-05
10:30:53.878913729 +0100
+++ syslinux-6.04-pre1-BROKEN/libinstaller/Makefile	2016-03-04
17:04:17.927473149 +0100
@@ -8,23 +8,24 @@ VPATH = $(SRC)

 all: installer

-bootsect_bin.c: $(OBJ)/../core/ldlinux.bss bin2c.pl
+bootsect_bin.c: $(OBJ)/../bios/core/ldlinux.bss bin2c.pl
 	$(PERL) $(SRC)/bin2c.pl syslinux_bootsect < $< > $@

-ldlinux_bin.c: $(OBJ)/../core/ldlinux.sys bin2c.pl
+ldlinux_bin.c: $(OBJ)/../bios/core/ldlinux.sys bin2c.pl
 	$(PERL) $(SRC)/bin2c.pl syslinux_ldlinux 512 < $< > $@

-mbr_bin.c: $(OBJ)/../mbr/mbr.bin bin2c.pl
+mbr_bin.c: $(OBJ)/../bios/mbr/mbr.bin bin2c.pl
 	$(PERL) $(SRC)/bin2c.pl syslinux_mbr < $< > $@

-gptmbr_bin.c: $(OBJ)/../mbr/gptmbr.bin bin2c.pl
+gptmbr_bin.c: $(OBJ)/../bios/mbr/gptmbr.bin bin2c.pl
 	$(PERL) $(SRC)/bin2c.pl syslinux_gptmbr < $< > $@

 installer: $(BINFILES)

-ldlinuxc32_bin.c: $(OBJ)/../com32/elflink/ldlinux/ldlinux.c32 bin2c.pl
+ldlinuxc32_bin.c: $(OBJ)/../bios/com32/elflink/ldlinux/ldlinux.c32 bin2c.pl
 	$(PERL) $(SRC)/bin2c.pl syslinux_ldlinuxc32 < $< > $@

+
 tidy:
 	rm -f $(BINFILES)

--- syslinux-6.04-pre1-BROKEN/extlinux/Makefile.ORIG	2016-03-04
17:18:08.042337985 +0100
+++ syslinux-6.04-pre1-BROKEN/extlinux/Makefile	2016-03-04 17:18:39.170418875
+0100
@@ -17,7 +17,7 @@
 include $(MAKEDIR)/syslinux.mk

 OPTFLAGS = -g -Os
-INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller
+INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../bios -I$(SRC)/../libinstaller
 CFLAGS	 = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
 	   $(OPTFLAGS) $(INCLUDES)
 LDFLAGS	 =
--- syslinux-6.04-pre1-BROKEN/utils/Makefile.ORIG	2016-03-04 17:21:56.879041790
+0100
+++ syslinux-6.04-pre1-BROKEN/utils/Makefile	2016-03-04 17:24:16.387537657 +0100
@@ -28,17 +28,17 @@ ASIS		 = $(addprefix $(SRC)/,keytab-lilo

 TARGETS = $(C_TARGETS) $(SCRIPT_TARGETS)

-ISOHDPFX = $(addprefix $(OBJ)/,../mbr/isohdpfx.bin ../mbr/isohdpfx_f.bin \
-	   ../mbr/isohdpfx_c.bin \
-	   ../mbr/isohdppx.bin ../mbr/isohdppx_f.bin ../mbr/isohdppx_c.bin)
+ISOHDPFX = $(addprefix $(OBJ)/,../bios/mbr/isohdpfx.bin
../bios/mbr/isohdpfx_f.bin \
+	   ../bios/mbr/isohdpfx_c.bin \
+	   ../bios/mbr/isohdppx.bin ../bios/mbr/isohdppx_f.bin
../bios/mbr/isohdppx_c.bin)

 all: $(TARGETS)

 %.o: %.c
 	$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<

-mkdiskimage: mkdiskimage.in ../mbr/mbr.bin bin2hex.pl
-	$(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../mbr/mbr.bin | cat
$(SRC)/mkdiskimage.in - > $@
+mkdiskimage: mkdiskimage.in ../bios/mbr/mbr.bin bin2hex.pl
+	$(PERL) $(SRC)/bin2hex.pl < $(OBJ)/../bios/mbr/mbr.bin | cat
$(SRC)/mkdiskimage.in - > $@
 	chmod a+x $@

 # Works on anything with a Perl interpreter...