LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-07-2012, 12:34 PM   #1
squid890
LQ Newbie
 
Registered: Jun 2010
Distribution: Slackware
Posts: 4

Rep: Reputation: 1
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
 
Old 07-07-2012, 12:39 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
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
 
Old 07-07-2012, 03:31 PM   #3
squid890
LQ Newbie
 
Registered: Jun 2010
Distribution: Slackware
Posts: 4

Original Poster
Rep: Reputation: 1
Worked like a champ. Thanks for the quick reply.
 
Old 07-11-2012, 02:00 PM   #4
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 331

Rep: Reputation: 50
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
 
Old 07-11-2012, 02:17 PM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
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.
 
Old 07-11-2012, 02:30 PM   #6
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 331

Rep: Reputation: 50
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
 
Old 07-11-2012, 02:41 PM   #7
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
sorry, but I can't understand what you want to do.
can you describe what you patched and for doing what?
 
Old 07-11-2012, 02:50 PM   #8
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 331

Rep: Reputation: 50
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:
diff --git a/system/grub2/initrd_naming.patch b/system/grub2/initrd_naming.patch
new file mode 100644
index 0000000..6b62778
--- a/dev/null
+++ b/system/grub2/initrd_naming.patch
@@ -0,0 +1,13 @@
+diff -Naur grub-2.00.orig/util/grub.d/10_linux.in grub-2.00/util/grub.d/10_linux.in
+--- grub-2.00.orig/util/grub.d/10_linux.in	2012-04-18 23:24:38.000000000 +0200
++++ grub-2.00/util/grub.d/10_linux.in	2012-06-30 07:53:03.765625589 +0200
+@@ -198,7 +198,8 @@
+ 	   "initramfs-genkernel-${version}" \
+ 	   "initramfs-genkernel-${alt_version}" \
+ 	   "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \
+-	   "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do
++	   "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}" \
++	   "initrd.gz"; do
+     if test -e "${dirname}/${i}" ; then
+       initrd="$i"
+       break
Thanks for your help.
 
Old 07-11-2012, 03:01 PM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,060

Rep: Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139Reputation: 4139
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
you can alternatively navigate in the tree (the link "tree" in the upper part of the page) and download the single already modified files (the link "plain" on the same line of the files).

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
patch -p1 < $CWD/initrd_naming.patch
for general usage of the slackbuild.org's scripts, have a look at the howto.

Last edited by ponce; 07-11-2012 at 03:42 PM.
 
1 members found this post helpful.
Old 07-11-2012, 03:53 PM   #10
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 331

Rep: Reputation: 50
Thanks! I'd got that all messed up!

Appreciate the clarification, all done.

Thanks again!
 
Old 07-02-2013, 11:23 PM   #11
geeth4sg
LQ Newbie
 
Registered: Feb 2008
Posts: 15

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] zoneminder-1.25.0 won't build in slackware64-current buckprivatemil Slackware 3 07-19-2013 08:07 PM
[SOLVED] Slackware64 -current: w3m fails to build... andrew.46 Slackware 12 06-16-2013 01:05 AM
[SOLVED] Cannot build physfs-2.0.2 on slackware64 -current andrew.46 Slackware 2 04-09-2012 10:21 PM
Akonadi errors on Slackware64 current BoydRice Slackware 10 05-02-2011 08:18 AM
What changes must be made in a slackBuild from 11.x To build for Slackware64 current? Alexvader Slackware 5 12-30-2009 01:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration