GRUB2 build errors running slackware64-current (slackware 14)
Trying to build GRUB2 on slackware-current. I had this machine running on a basic slackware64 13.37 install and I liked booting with GRUB. Dumped everything and loaded up -current. Everything seems to work except when trying to build the GRUB2 package it errors out with the following:
gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -nostdinc -isystem /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/include -DGRUB_FILE=\"fs/zfs/zfs.c\" -I. -I. -I.. -I.. -I../include -I../include -Os -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -mrtd -mregparm=3 -ffreestanding -O2 -MT fs/zfs/zfs_module-zfs.o -MD -MP -MF fs/zfs/.deps-core/zfs_module-zfs.Tpo -c -o fs/zfs/zfs_module-zfs.o `test -f 'fs/zfs/zfs.c' || echo './'`fs/zfs/zfs.c fs/zfs/zfs.c: In function 'get_filesystem_dnode': fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c: In function 'make_mdn': fs/zfs/zfs.c:1478:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c: In function 'dnode_get_fullpath': fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c: In function 'grub_zfs_open': fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c: In function 'fill_fs_info': fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c: In function 'iterate_zap': fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c: In function 'grub_zfs_dir': fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] cc1: all warnings being treated as errors make[3]: *** [fs/zfs/zfs_module-zfs.o] Error 1 make[3]: Leaving directory `/tmp/SBo/grub-1.99/grub-core' make[2]: *** [all] Error 2 make[2]: Leaving directory `/tmp/SBo/grub-1.99/grub-core' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/SBo/grub-1.99' make: *** [all] Error 2 |
1.99 doesn't build on -current, try building 2.00: these are the modifications I have made here to the slackbuilds.org script
http://cgit.ponce.cc/slackbuilds/commit/?h=grub2 |
Worked like a champ. Thanks for the quick reply.
|
Thanks for this - I now have grub2 installed.
Just a quick question - I made a patch file. Will it have been processed automatically during the build process or do I need to run it separately? Thanks in advance |
as you can see in the modifications I have made in the link above to the slackbuilds.org's script for building grub2, usually patches apply before the package compiling process, just after the source tarball extraction, so that the building phase runs on the patched sources.
|
great, thanks. I'll reverse the installation of grub2. I've not used a patch file before.
This is a really dumb question now I've done it wrong - do I patch the grub-2.00.tar.xz? Thanks |
sorry, but I can't understand what you want to do.
can you describe what you patched and for doing what? |
In the link above you provide some amendments to the grub2.SlackBuild and other files.
To cut a long story short, I don't know what to do with this bit of code. I was thinking that I make a .patch file that I then need to apply to a file. Sorry if I seem obtuse, I've just not encountered this before. Code:
|
no prob :)
that is a git commit in my repository, in which I'm modifying some files of the grub2 build script hosted on slackbuilds.org. you can download the tarball from slackbuilds.org, extract it, enter the grub2 folder and then apply the patch of the whole commit (the link "patch" on the "commit" line) Code:
patch -p1 < ../7eef5365a40c3c8bc39c092947baae6b432cbfad.patch then you can launch the slackbuild to build grub2 (assumed you have installed before all the dependencies listed in its README and downloaded the sources of grub2 in the same folder), the additional initrd_naming.patch file (that you can see in its patch form above: that is a patch that create itself another patch, the file initrd_naming.patch) is applied automatically during the build by the patched grub2.Slackbuild, that has these lines added inside Code:
# We use initrd.gz here, so look for it too |
Thanks! I'd got that all messed up!
Appreciate the clarification, all done. Thanks again! |
slackbuild for kernel 2.3.4 with xen options
Hi all,
I need the package of kernel with below options: "Processor type and features" -> "High Memory Support" -> Make sure it is set to 64GB • "Processor type and features" -> "PAE (Physical Address Extension) Support" -> enable • "Processor type and features" -> "Paravirtualized guest support" -> enable • "Processor type and features" -> "Paravirtualized guest support" -> "Xen guest support" -> enable • "Device Drivers" -> "Block devices" -> "Xen virtual block device support" -> enable either as a module or built in • "Device Drivers" -> "Network device support" -> "Xen network device frontend driver" -> enable either as a module or built in The below package is not boot on Xen I mean Amazon aws... #!/bin/bash # Make sure your source tree is ready before running this script. See # README for instructions. # # Ivan Grigoryevich Zaigralin a.k.a. melikamp. Copyright (C) 2012 # # Slackware build script for kernel, modules, and firmware. Written # by melikamp <melikamp@melikamp.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # without any warranty; without even the implied warranty of # merchantability or fitness for a particular purpose. Compiling, # interpreting, executing or merely reading the text of the program # may result in lapses of consciousness and/or very being, up to and # including the end of all existence and the Universe as we know it. # See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program (most likely, a file named COPYING). If # not, see <http://www.gnu.org/licenses/>. # # You can get the latest version of this slackbuild early at # http://melikamp.com/features/slackbuilds.shtml TMP=/tmp CWD=$(pwd) PKG=/tmp/package-kernel LINUX_SOURCE_PATH=${LINUX_SOURCE_PATH:-/usr/src/linux} # Exit on most errors. set -e cd $LINUX_SOURCE_PATH # Extract kernel version. KERNEL_RELEASE=$(make kernelrelease) KERNNAME=common VERSION=$KERNEL_RELEASE # Slackware packager does not tolerate - in version PKG_VERSION=$(echo $KERNEL_RELEASE | tr - .) ARCH=NONE if [ -r arch/x86_64/boot/bzImage ] ; then ARCH=x86_64 elif [ -r arch/x86/boot/bzImage ] ; then ARCH=x86 fi BUILD=${BUILD:-1} KERNEL=arch/$ARCH/boot/bzImage SYSMAP=System.map CONFIG=.config echo "kernel: $(pwd)/$KERNEL" echo "sysmap: $(pwd)/$SYSMAP" echo "config: $(pwd)/$CONFIG" echo 'Checking availability...' test -r $KERNEL -a -r $SYSMAP -a -r $CONFIG echo 'Found!' echo "Press any key to package kernel release $KERNEL_RELEASE" read -n 1 junk # Set up package rm -rf $PKG mkdir -p $PKG mkdir -p $PKG/boot mkdir -p $PKG/lib/modules mkdir -p $PKG/lib/firmware/${VERSION} echo 'Staging kernel image, map, config.' cp $KERNEL $PKG/boot/vmlinuz-$KERNNAME-${VERSION} ( cd $PKG/boot ; ln -sf vmlinuz-$KERNNAME-${VERSION} vmlinuz ) cp $SYSMAP $PKG/boot/System.map-$KERNNAME-${VERSION} ( cd $PKG/boot ; ln -sf System.map-$KERNNAME-${VERSION} System.map ) cp $CONFIG $PKG/boot/config-$KERNNAME-${VERSION} ( cd $PKG/boot ; ln -sf config-$KERNNAME-${VERSION} config ) echo 'Staging modules and firmware.' make INSTALL_MOD_PATH=$PKG\ INSTALL_FW_PATH=$PKG/lib/firmware/${VERSION}\ modules_install firmware_install echo 'Staging documentation.' DOCDIR=$PKG/usr/doc/kernel-$KERNNAME-${VERSION} mkdir -p $DOCDIR cp -a $CWD/README $CWD/kernel-common.SlackBuild $DOCDIR mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc echo 'Creating the package.' cd $PKG makepkg -l y -c n $TMP/kernel-$KERNNAME-${PKG_VERSION}-$ARCH-$BUILD.txz |
All times are GMT -5. The time now is 02:28 AM. |