Difference between revisions of "Building"
m (Re-order (sort). Wiki formatting.) |
m (Minor correction to prior edition.) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- --> | <!-- --> | ||
− | * | + | * <span id="gcc-10">[[#gcc-10| ]]</span><!-- |
− | + | --> '''gcc-10''' linker failure: "''multiple definition of...''". <!-- | |
− | + | --> <p><!-- | |
− | + | --> syslinux-6.04_pre1 fails to build on gcc-10 due to <!-- | |
− | + | --> {{nowrap|1=<tt>-fno-common</tt>}} change; <!-- | |
+ | --> {{nowrap|1=<tt>gcc-10</tt>}} (and above) [https://gcc.gnu.org/gcc-10/porting_to.html#common flipped] a default, from <!-- | ||
+ | --> {{nowrap|1=<tt>-fcommon</tt>}} to {{nowrap|1=<tt>-fno-common</tt>.}} <!-- | ||
+ | --> </p><!-- | ||
--><!-- | --><!-- | ||
− | --><!-- References: | + | --><!-- |
+ | --><!-- <p>--><!-- | ||
+ | --><!-- This changed <tt>gcc</tt> code generator to emit globals without explicit initializer --><!-- | ||
+ | --><!-- from {{nowrap|.bss}} (via COMMON symbol type) to {{nowrap|.data}} (via DEFAULT symbol type). --><!-- | ||
+ | --><!-- </p>--><!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --> <p><!-- | ||
+ | --> {{nowrap|1=<tt>gcc-10</tt>}} will reject multiple definitions of global variables. <!-- | ||
+ | --> Possible/potential <u>workaround</u>: {{nowrap|add/append}} {{nowrap|1=<tt>-fcommon</tt>}} to CFLAGS. <!-- | ||
+ | --><!-- Other workarounds and better solutions are available too. --><!-- | ||
+ | --> [https://gcc.gnu.org/gcc-10/porting_to.html#common Ideally], <!-- | ||
+ | --> the code would need a few {{nowrap|1='<tt>extern</tt>'}} additions and maybe moving variable definitions. <!-- | ||
+ | --> </p><!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- <p>--><!-- | ||
+ | --><!-- | ||
+ | --><!-- References: | ||
+ | --><!-- Gentoo: | ||
+ | --><!-- | ||
+ | --><!-- sys-boot/syslinux-6.04_pre1 fails to build on gcc-10 due to -fno-common change | ||
+ | --><!-- https://bugs.gentoo.org/705730 | ||
+ | --><!-- https://bugs.gentoo.org/attachment.cgi?id=618170&action=diff | ||
+ | --><!-- https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8284530f | ||
+ | --><!-- | ||
+ | --><!-- GCCOPT += $(call gcc_ok,-fcommon) | ||
+ | --><!-- | ||
+ | --><!-- mk/com32.mk | ||
+ | --><!-- mk/elf.mk | ||
+ | --><!-- mk/embedded.mk | ||
+ | --><!-- mk/lib.mk | ||
+ | --><!-- mk/efi.mk | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- Gcc 10 porting notes/fno common | ||
+ | --><!-- https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common | ||
+ | --><!-- | ||
+ | --><!-- (-fno-common) - Packages failing with -fno-common | ||
+ | --><!-- https://bugs.gentoo.org/705764 | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- SUSE: | ||
+ | --><!-- | ||
+ | --><!-- GCC 10: syslinux build fails | ||
+ | --><!-- https://bugzilla.suse.com/show_bug.cgi?id=1166605 | ||
+ | --><!-- | ||
+ | --><!-- Patch | ||
+ | --><!-- https://build.opensuse.org/package/view_file/openSUSE:Factory/syslinux/syslinux-4.04-gcc10.diff?expand=1 | ||
+ | --><!-- | ||
+ | --><!-- https://build.opensuse.org/request/show/786496 | ||
+ | --><!-- | ||
+ | --><!-- Changes | ||
+ | --><!-- https://build.opensuse.org/package/view_file/openSUSE:Factory/syslinux/syslinux.changes?expand=1 | ||
+ | --><!-- Thu Mar 19 14:24:57 UTC 2020 - Steffen Winterfeldt <snwint@suse.com> | ||
+ | --><!-- | ||
+ | --><!-- - syslinux-4.04-gcc10.diff: fix gcc10 related issues (bsc#1166605) | ||
+ | --><!-- * -fno-common is now the default | ||
+ | --><!-- * provide missing strlen() implementation | ||
+ | --><!-- | ||
+ | --><!-- [META] GCC 10 package failures | ||
+ | --><!-- https://bugzilla.suse.com/show_bug.cgi?id=1157217 | ||
+ | --><!-- | ||
+ | --><!-- [META] -fno-common package failures | ||
+ | --><!-- https://bugzilla.suse.com/1160244 | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- FEDORA: | ||
+ | --><!-- | ||
+ | --><!-- https://src.fedoraproject.org/rpms/syslinux/c/59d844624c245e03700287f7ee7adf257e1761dc?branch=master | ||
+ | --><!-- | ||
+ | --><!-- Patch0005: 0005-Workaround-multiple-definition-of-symbol-errors.patch | ||
+ | --><!-- Patch0006: 0006-Replace-builtin-strlen-that-appears-to-get-optimized.patch | ||
+ | --><!-- | ||
+ | --><!-- merge request | ||
+ | --><!-- https://src.fedoraproject.org/rpms/syslinux/pull-request/2 | ||
+ | --><!-- | ||
+ | --><!-- * a specific build dependency has been added to the SPEC file. | ||
+ | --><!-- * -z muldefs was added to the loader flags in several Makefiles | ||
+ | --><!-- * The GCC optimizer apparently does away with using the internal version of strlen()--__builtin_strlen(). | ||
+ | --><!-- To address this, an inline version was added to dos/string.h. | ||
+ | --><!-- | ||
+ | --><!-- No mention about -fnocommon nor about gcc | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- DEBIAN: | ||
+ | --><!-- | ||
+ | --><!-- https://bugs.debian.org/957858 | ||
+ | --><!-- https://salsa.debian.org/images-team/syslinux/-/commit/d9683a835ff9c13ad2378a64145a4f19aaf6dd37 | ||
+ | --><!-- https://salsa.debian.org/images-team/syslinux/-/blob/debian/master/debian/patches/0019-gcc-10-compatibility.patch | ||
+ | --><!-- https://sources.debian.org/src/syslinux/3:6.04%7Egit20190206.bf6db5b4+dfsg1-3/debian/patches/0019-gcc-10-compatibility.patch/ | ||
+ | --><!-- | ||
+ | --><!-- dos/string.h | ||
+ | --><!-- mk/elf.mk | ||
+ | --><!-- mk/embedded.mk | ||
+ | --><!-- mk/lib.mk | ||
+ | --><!-- mk/efi.mk | ||
+ | --><!-- | ||
+ | --><!-- Note that Debian doesn't (need to) patch | ||
+ | --><!-- mk/com32.mk | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- GCC: | ||
+ | --><!-- | ||
+ | --><!-- https://gcc.gnu.org/PR85678 | ||
+ | --><!-- https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html | ||
+ | --><!-- https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fcommon | ||
+ | --><!-- https://gcc.gnu.org/gcc-10/porting_to.html#common | ||
+ | --><!-- | ||
+ | --><!-- </p>--><!-- | ||
+ | --><!-- --> | ||
+ | * <span id="strlen">[[#strlen| ]]</span><!-- | ||
+ | --> <code>undefined reference to `strlen'</code>. <!-- | ||
+ | --> Possibly related to (the link to) <tt>libc</tt> <!-- | ||
+ | --> and/or to GCC-10+ optimizer. <!-- | ||
+ | --> Solution: <!-- | ||
+ | --> provide missing <code>strlen()</code> implementation <!-- | ||
+ | --> in <code>dos/string.h</code>. <!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- <p>--><!-- | ||
+ | --><!-- | ||
+ | --><!-- References (alternatives): | ||
+ | --><!-- | ||
+ | --><!-- ** SUSE: | ||
+ | --><!-- Including <stdlib.h> | ||
+ | --><!-- https://build.opensuse.org/request/show/786496#n57 | ||
+ | --><!-- | ||
+ | --><!-- ** FEDORA: | ||
+ | --><!-- Including <stddef.h> and defining "inline_strlen(a)" | ||
+ | --><!-- https://src.fedoraproject.org/rpms/syslinux/pull-request/2#request_diff | ||
+ | --><!-- | ||
+ | --><!-- </p>--><!-- | ||
+ | --><!-- --> | ||
+ | * <span id="pow">[[#pow| ]]</span><!-- | ||
+ | --> Prevent-pow-optimization when using gcc 8.2+. <!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- https://sources.debian.org/src/syslinux/3:6.04%7Egit20190206.bf6db5b4+dfsg1-2/debian/patches/0018-prevent-pow-optimization.patch/ | ||
+ | --><!-- | ||
+ | --><!-- * The following patches might need re-basing, on 6.04-pre1. | ||
+ | --><!-- https://repo.or.cz/syslinux/sherbszt.git/commit/d93748413c9962539a813c5244d7ca6ac71950ea | ||
+ | --><!-- | ||
+ | --><!-- ** https://repo.or.cz/syslinux/sherbszt.git/blobdiff/303c54a0b2a163b9888c970f28f2475a068cc231..d93748413c9962539a813c5244d7ca6ac71950ea:/com32/include/math.h | ||
+ | --REMOVE.THIS.TEXT.TO.SHOW> | ||
+ | {| | ||
+ | | | ||
+ | <pre> | ||
+ | --- a/com32/include/math.h | ||
+ | +++ b/com32/include/math.h | ||
+ | @@ -9,6 +9,7 @@ | ||
+ | #endif | ||
+ | |||
+ | double pow(double, double); | ||
+ | +double exp(double); | ||
+ | double fabs(double); | ||
+ | double strtod(const char *, char **); | ||
+ | </pre> | ||
+ | |} | ||
+ | <!-- | ||
+ | --><!-- ** https://repo.or.cz/syslinux/sherbszt.git/blob/d93748413c9962539a813c5244d7ca6ac71950ea:/com32/lib/i386/math/exp.S | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --><!-- The following patch might need re-basing, on 6.04-pre1, i.e. from | ||
+ | --><!-- "<code>/com32/lib/i386/math/exp.S</code>" to "<code>/com32/lib/math/exp.S</code>" | ||
+ | --><!-- (no "i386" directory in the path). | ||
+ | --><!-- | ||
+ | --REMOVE.THIS.TEXT.TO.SHOW> | ||
+ | {| | ||
+ | | | ||
+ | <pre> | ||
+ | [new file with mode: 0644] | ||
+ | --- /dev/null | ||
+ | +++ b/com32/lib/math/exp.S | ||
+ | @@ -0,0 +1,25 @@ | ||
+ | /* | ||
+ | * exp.S | ||
+ | * | ||
+ | * double exp(double exponent) | ||
+ | */ | ||
+ | |||
+ | .text | ||
+ | .globl exp | ||
+ | .type exp,@function | ||
+ | exp: | ||
+ | fldl 4(%esp) | ||
+ | fldl2e | ||
+ | fmulp | ||
+ | fld %st(0) | ||
+ | frndint | ||
+ | fsubr %st,%st(1) | ||
+ | fxch %st(1) | ||
+ | f2xm1 | ||
+ | fld1 | ||
+ | faddp %st,%st(1) | ||
+ | fscale | ||
+ | fstp %st(1) | ||
+ | ret | ||
+ | |||
+ | .size exp,.-exp | ||
+ | </pre> | ||
+ | |} | ||
+ | <!-- | ||
+ | --> | ||
+ | * <span id="lzo_init">[[#lzo_init| ]]</span><!-- | ||
+ | --> <code>internal error - lzo_init() failed!</code> <!-- | ||
+ | --> (inconsistent/sporadic error). <!-- | ||
+ | --> <p> Syslinux fails to build due to aliasing bugs in lzo. <!-- | ||
+ | --> Add {{nowrap|1=<code>-fno-strict-aliasing</code>}} to {{nowrap|1=<code>lzo/Makefile</code>.}} <!-- | ||
+ | --> </p><!-- | ||
+ | --> References: | ||
+ | ** <!-- | ||
+ | --> <p><!-- | ||
+ | --> [https://bugzilla.suse.com/1125616] <!-- | ||
+ | --><!-- | ||
+ | --><!-- [https://build.opensuse.org/package/view_file/system:install:head/syslinux6/18_lzo.diff?expand=1] | ||
+ | --><!-- [https://build.opensuse.org/package/view_file/openSUSE:Factory/syslinux/syslinux-4.04-lzo.diff?rev=f8bf3fec929e35b8b983d749c1f14511] | ||
+ | --><!-- | ||
+ | --> </p><!-- | ||
+ | --><!-- --> | ||
+ | * <span id="binutils231">[[#binutils231| ]]</span><!-- | ||
+ | --> Fix broken efi binaries with '''binutils 2.31+'''. <!-- | ||
+ | --> <p><!-- | ||
+ | --> "Binutils >= 2.31 writes two PT_LOAD segments by default. <!-- | ||
+ | --> This is not supported by the <tt>wrapper.c</tt> script used to convert the shared object into an elf binary." <!-- | ||
+ | --> </p><!-- | ||
+ | --> References: | ||
+ | ** [https://salsa.debian.org/images-team/syslinux/commit/012e1dd312eb8c1f9a52239966e0be0169d7af98 <!-- | ||
+ | -->"Patches from Debian"] ( Lukas Schwaighofer <!-- (irc: lus) --> ) | ||
+ | ** [https://www.syslinux.org/archives/2018-August/026168.html <!-- | ||
+ | -->Discard .note.gnu.property section to fix build failure (patch)] | ||
+ | ** [https://www.syslinux.org/archives/2018-August/026167.html <!-- | ||
+ | -->Patch: fix syslinux.efi (Re: Unable to get syslinux.efi to work, grub2 boots tho)] | ||
+ | ** [https://www.syslinux.org/archives/2020-July/026680.html <!-- | ||
+ | -->mk/efi: add <code>-znoseparate-code</code> to LD_FLAGS for EFI builds] <!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | ** [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f6aec96dce1ddbd8961a3aa8a2925db2021719bb <!-- | ||
+ | --><!--ld: Add --enable-separate-code] --><!-- | ||
+ | --><!-- | ||
+ | --><!-- --> | ||
+ | * <span id="binutils227">[[#binutils227| ]]</span><!-- | ||
+ | --> If getting "'''''Not enough room for program headers'''''", try adding <!-- | ||
+ | --> {{nowrap|1='<tt>--no-dynamic-linker</tt>'}} to the linker command line(s). <!-- | ||
+ | --> Seen with '''binutils 2.27+'''. <!-- | ||
+ | --> There might be other / better solutions / work-around methods. <!-- | ||
+ | --><!-- | ||
+ | --><!-- References: | ||
--><!-- http://www.syslinux.org/archives/2017-February/025531.html | --><!-- http://www.syslinux.org/archives/2017-February/025531.html | ||
--><!-- http://bugs.debian.org/846679#10 | --><!-- http://bugs.debian.org/846679#10 | ||
--><!-- http://www.syslinux.org/archives/2017-April/025748.html "Cross-compilation patches" (Benoît Allard (irc: benallard)) | --><!-- http://www.syslinux.org/archives/2017-April/025748.html "Cross-compilation patches" (Benoît Allard (irc: benallard)) | ||
− | --><!-- --> | + | --><!-- |
− | <!-- --> | + | --> <p> Note: 6.04-pre1+ should not be affected by this issue. </p> <!-- |
− | <!-- --> | + | --><!-- |
− | * When building with '''glibc 2.23+''', the "major", "minor" and "makedev" <!-- | + | --><!-- References: |
− | + | --><!-- http://www.syslinux.org/archives/2017-October/025948.html "Patches from Debian" (Lukas Schwaighofer (irc: lus)) | |
− | + | --><!-- | |
− | + | --> <p> [[Contact|Feedback]] is appreciated. </p> <!-- | |
− | + | --><!-- | |
− | + | --><!-- --> | |
+ | * <span id="glibc223">[[#glibc223| ]]</span><!-- | ||
+ | -->When building with '''glibc 2.23+''', the "major", "minor" and "makedev" <!-- | ||
+ | --> functions are defined in {{nowrap|"<tt>sys/sysmacros.h</tt>"}}. <!-- | ||
+ | --> The patch <!-- | ||
+ | --> [http://repo.or.cz/syslinux.git/commit/1a74985b2a404639b08882c57f3147229605dfd5 <!-- | ||
+ | -->"extlinux: pull in sys/sysmacros.h for major/minor/makedev"], <!-- | ||
+ | --> applied to Syslinux during 2016Apr, should help. <!-- | ||
+ | --> Please note that not only Syslinux is affected by this change in glibc. | ||
<!-- --> | <!-- --> | ||
− | <br /> | + | <br /><span id="604pre1">[[#604pre1| ]]</span><!-- |
− | Patches already included in Syslinux 6.04-pre1 (released 2016Mar): | + | -->Patches already included in Syslinux 6.04-pre1 |
+ | (released 2016Mar): | ||
− | * Building Syslinux 6.03 with '''gcc5+''': | + | * Building Syslinux 6.03 with '''gcc5+''': |
− | ** [http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce gcc fix alignment] | + | ** [http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce <!-- |
− | ** [http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe don't guess sections' alignment] | + | -->gcc fix alignment] |
− | ** [http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce?hp=9e0926bb338deb5c634ccb4ee29eb4577158cfdc ldlinux: Fix return pointer to local data] | + | ** [http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe <!-- |
+ | -->don't guess sections' alignment] | ||
+ | ** [http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce?hp=9e0926bb338deb5c634ccb4ee29eb4577158cfdc <!-- | ||
+ | -->ldlinux: Fix return pointer to local data] | ||
<!-- --> | <!-- --> | ||
− | * Use [http://repo.or.cz/syslinux.git/patch/7d70885d22e4474407637026c1af12a253281407?hp=2d14923c02aa343f650a5bee128e9ea383a0ed59 -mno-red-zone for EFI] | + | * Use [http://repo.or.cz/syslinux.git/patch/7d70885d22e4474407637026c1af12a253281407?hp=2d14923c02aa343f650a5bee128e9ea383a0ed59 <!-- |
+ | -->-mno-red-zone for EFI] | ||
* Syslinux 6.03 might fail to boot in some hardware (e.g. some Chromebooks). <!-- | * Syslinux 6.03 might fail to boot in some hardware (e.g. some Chromebooks). <!-- | ||
− | + | --> The patch <!-- | |
− | + | --> [http://repo.or.cz/syslinux.git/patch/0a2dbb3392ee710838bea6bda80d4daad6b54780?hp=f1e95ca49902b5eda4c02275a69152d4834882d6 <!-- | |
− | --><!-- --> | + | -->"relocate protected-mode code as intended"], <!-- |
− | --><!-- https://bugs.launchpad.net/ | + | --> applied to Syslinux during 2015Apr, might help. <!-- |
− | --><!-- https://bugs.debian.org/ | + | --><!-- --><!-- |
− | --><!-- https://bugzilla.redhat.com/ | + | --><!-- https://bugs.launchpad.net/bugs/1429323 --><!-- |
− | --><!-- Another possibly-related commit might be [http://repo.or.cz/syslinux.git/commit/83aad4f69065509ba5b1c080edccfed316a4cff0 "correct a type"] --> | + | --><!-- https://bugs.debian.org/780765 --><!-- |
− | --><!-- also from Scot Doyle. <-- | + | --><!-- https://bugzilla.redhat.com/1135793#c21 --><!-- |
− | --> < | + | --><!-- Another possibly-related commit might be --><!-- |
− | + | --><!-- [http://repo.or.cz/syslinux.git/commit/83aad4f69065509ba5b1c080edccfed316a4cff0 --><!-- | |
+ | --><!-- "correct a type"] --><!-- | ||
+ | --><!-- also from Scot Doyle. --><!-- | ||
+ | --><!-- | ||
+ | --><!-- | ||
+ | --> | ||
+ | |||
+ | <br /> | ||
+ | Testing Syslinux {{nowrap|6.04-pre1}} (or later) is recommended. | ||
== Other == | == Other == | ||
* '''NASM 2.11.06''' has a bug which prevents Syslinux from building <!-- | * '''NASM 2.11.06''' has a bug which prevents Syslinux from building <!-- | ||
− | + | --> correctly. Use other version of NASM <!-- | |
− | + | --> (e.g. 2.11.05, 2.11.08+, among others). | |
* '''binutils 2.26''', as originally released upstream, has a <!-- | * '''binutils 2.26''', as originally released upstream, has a <!-- | ||
− | + | --> [https://sourceware.org/bugzilla/show_bug.cgi?id=19538 bug] <!-- | |
− | + | --> preventing Syslinux from building correctly. The bug in <!-- | |
− | + | --> bintuils 2.26 was resolved in a later commit. | |
<!-- Keywords / terms to help search engines: --> | <!-- Keywords / terms to help search engines: --> | ||
<!-- impossible constraint in ‘asm’ --> | <!-- impossible constraint in ‘asm’ --> | ||
− | * "error: impossible constraint in asm". <!-- | + | * "error: impossible constraint in asm". <!-- |
− | --> When gcc5+ is configured with <!-- | + | --> When gcc5+ is configured with <!-- |
− | --> {{nowrap|<tt>--enable-default-pie</tt>}}, <!-- | + | --> {{nowrap|<tt>--enable-default-pie</tt>}}, <!-- |
− | --> in some cases there might be a need to use custom flags <!-- | + | --> in some cases there might be a need to use custom flags <!-- |
− | --> in some {{nowrap|makefile(s),}} similar to either <!-- | + | --> in some {{nowrap|makefile(s),}} similar to either <!-- |
− | --> {{nowrap|1="<code><nowiki>CFLAGS += -fno-pie</nowiki></code>"}} or <!-- | + | --> {{nowrap|1="<code><nowiki>CFLAGS += -fno-pie</nowiki></code>"}} or <!-- |
− | --> {{nowrap|1="<code><nowiki>CFLAGS := -fno-pie</nowiki></code>".}} <!-- | + | --> {{nowrap|1="<code><nowiki>CFLAGS := -fno-pie</nowiki></code>".}} <!-- |
− | --> Examples: | + | --> Examples: <!-- |
+ | --> | ||
<!-- ArchLinux --> | <!-- ArchLinux --> | ||
** [http://bugzilla.syslinux.org/show_bug.cgi?id=70] | ** [http://bugzilla.syslinux.org/show_bug.cgi?id=70] | ||
<!-- Ubuntu and Debian --> | <!-- Ubuntu and Debian --> | ||
** [https://bugs.launchpad.net/bugs/1579023] and <!-- | ** [https://bugs.launchpad.net/bugs/1579023] and <!-- | ||
− | --> [https://anonscm.debian.org/git/collab-maint/syslinux.git/commit/?id=9faf103f53ba4094cdce153a223239a62aa48ac5] | + | --><!-- |
− | + | --><!-- prior/old url: --><!-- | |
+ | --><!-- [https://anonscm.debian.org/git/collab-maint/syslinux.git/commit/?id=9faf103f53ba4094cdce153a223239a62aa48ac5] --><!-- | ||
+ | --><!-- --><!-- | ||
+ | --> [https://salsa.debian.org/images-team/syslinux/commit/9faf103f53ba4094cdce153a223239a62aa48ac5] | ||
+ | <br /> | ||
== See also == | == See also == | ||
Latest revision as of 17:37, 17 August 2020
- gcc-10 linker failure: "multiple definition of...".
syslinux-6.04_pre1 fails to build on gcc-10 due to -fno-common change; gcc-10 (and above) flipped a default, from -fcommon to -fno-common.
gcc-10 will reject multiple definitions of global variables. Possible/potential workaround: add/append -fcommon to CFLAGS. Ideally, the code would need a few 'extern' additions and maybe moving variable definitions.
-
undefined reference to `strlen'
. Possibly related to (the link to) libc and/or to GCC-10+ optimizer. Solution: provide missingstrlen()
implementation indos/string.h
. - Prevent-pow-optimization when using gcc 8.2+.
-
internal error - lzo_init() failed!
(inconsistent/sporadic error).Syslinux fails to build due to aliasing bugs in lzo. Add
References:-fno-strict-aliasing
tolzo/Makefile
. - Fix broken efi binaries with binutils 2.31+.
"Binutils >= 2.31 writes two PT_LOAD segments by default. This is not supported by the wrapper.c script used to convert the shared object into an elf binary."
References: - If getting "Not enough room for program headers", try adding '--no-dynamic-linker' to the linker command line(s). Seen with binutils 2.27+. There might be other / better solutions / work-around methods.
Note: 6.04-pre1+ should not be affected by this issue.
Feedback is appreciated.
- When building with glibc 2.23+, the "major", "minor" and "makedev" functions are defined in "sys/sysmacros.h". The patch "extlinux: pull in sys/sysmacros.h for major/minor/makedev", applied to Syslinux during 2016Apr, should help. Please note that not only Syslinux is affected by this change in glibc.
Patches already included in Syslinux 6.04-pre1
(released 2016Mar):
- Building Syslinux 6.03 with gcc5+:
- Use -mno-red-zone for EFI
- Syslinux 6.03 might fail to boot in some hardware (e.g. some Chromebooks). The patch "relocate protected-mode code as intended", applied to Syslinux during 2015Apr, might help.
Testing Syslinux 6.04-pre1 (or later) is recommended.
Other
- NASM 2.11.06 has a bug which prevents Syslinux from building correctly. Use other version of NASM (e.g. 2.11.05, 2.11.08+, among others).
- binutils 2.26, as originally released upstream, has a bug preventing Syslinux from building correctly. The bug in bintuils 2.26 was resolved in a later commit.
- "error: impossible constraint in asm". When gcc5+ is configured with --enable-default-pie, in some cases there might be a need to use custom flags in some makefile(s), similar to either "
CFLAGS += -fno-pie
" or "CFLAGS := -fno-pie
". Examples: