Discussion:
Problem with GNU Mach compilation
Almudena Garcia
2018-06-25 16:13:27 UTC
Permalink
HHi all:

I'm trying to compile GNU Mach from GNU Hurd, using the sources from git
repository.

I based on this guide:
https://www.gnu.org/software/hurd/microkernel/mach/gnumach/building.html
But, during the latest step (make gnumach.gz), It returns a linker error (I
attach the log file)

My steps were these:

-

git clone git://git.savannah.gnu.org/hurd/gnumach.git
cd gnumach/

apt-get build-dep gnumach

autoreconf --install

mkdir build
cd build/

./configure --prefix=
make DESTDIR=~/gnu install-data

git clone git://git.savannah.gnu.org/hurd/mig.git
cd mig

autoreconf --install

mkdir build
cd build

GNU=~/gnu

TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU"

PATH=~/gnu/bin:$PATH
export PATH

cd ../.. #Return to gnumach/build

mig
make gnumach.gz


How can I solve this?
Almudena Garcia
2018-06-27 16:12:53 UTC
Permalink
Finally, I got to solve the problem, adding a few flags to Makefile.am

http://dpaste.com/2NRGESV

I attach the patch file
Post by Almudena Garcia
I'm trying to compile GNU Mach from GNU Hurd, using the sources from git
repository.
I based on this guide: https://www.gnu.org/software/
hurd/microkernel/mach/gnumach/building.html
But, during the latest step (make gnumach.gz), It returns a linker error
(I attach the log file)
-
git clone git://git.savannah.gnu.org/hurd/gnumach.git
cd gnumach/
apt-get build-dep gnumach
autoreconf --install
mkdir build
cd build/
./configure --prefix=
make DESTDIR=~/gnu install-data
git clone git://git.savannah.gnu.org/hurd/mig.git
cd mig
autoreconf --install
mkdir build
cd build
GNU=~/gnu
TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU"
PATH=~/gnu/bin:$PATH
export PATH
cd ../.. #Return to gnumach/build
mig
make gnumach.gz
How can I solve this?
Samuel Thibault
2018-06-27 16:17:03 UTC
Permalink
Post by Almudena Garcia
I attach the patch file
Please use diff -u, not just diff.

Samuel
Almudena Garcia
2018-06-27 16:18:00 UTC
Permalink
Yes, I just send a fixed patch file, with diff -u
Post by Samuel Thibault
Post by Almudena Garcia
I attach the patch file
Please use diff -u, not just diff.
Samuel
Almudena Garcia
2018-06-27 17:22:42 UTC
Permalink
Have you received my latest patch?
Post by Almudena Garcia
Yes, I just send a fixed patch file, with diff -u
Post by Samuel Thibault
Post by Almudena Garcia
I attach the patch file
Please use diff -u, not just diff.
Samuel
Almudena Garcia
2018-06-27 16:16:21 UTC
Permalink
The last patch file was wrong to generate. I attach a better patch file
Post by Almudena Garcia
Finally, I got to solve the problem, adding a few flags to Makefile.am
http://dpaste.com/2NRGESV
I attach the patch file
Post by Almudena Garcia
I'm trying to compile GNU Mach from GNU Hurd, using the sources from git
repository.
I based on this guide: https://www.gnu.org/software/h
urd/microkernel/mach/gnumach/building.html
But, during the latest step (make gnumach.gz), It returns a linker error
(I attach the log file)
-
git clone git://git.savannah.gnu.org/hurd/gnumach.git
cd gnumach/
apt-get build-dep gnumach
autoreconf --install
mkdir build
cd build/
./configure --prefix=
make DESTDIR=~/gnu install-data
git clone git://git.savannah.gnu.org/hurd/mig.git
cd mig
autoreconf --install
mkdir build
cd build
GNU=~/gnu
TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU"
PATH=~/gnu/bin:$PATH
export PATH
cd ../.. #Return to gnumach/build
mig
make gnumach.gz
How can I solve this?
Samuel Thibault
2018-06-27 19:45:09 UTC
Permalink
- -fno-builtin-log
+ -fno-builtin-log --no-pie --no-pic
I'm surprised by the form of the option. I would have thought rather

-no-pie -fno-pic

which are documented, while the options above are not. Could you try
them instead?

Samuel
Almudena Garcia
2018-06-27 20:06:32 UTC
Permalink
I don't be sure. I asked in #hurd Freenode channel, and one person
suggested me to add this flags
Post by Samuel Thibault
- -fno-builtin-log
+ -fno-builtin-log --no-pie --no-pic
I'm surprised by the form of the option. I would have thought rather
-no-pie -fno-pic
which are documented, while the options above are not. Could you try
them instead?
Samuel
Almudena Garcia
2018-06-27 20:12:53 UTC
Permalink
This is the conversation
Post by Almudena Garcia
I don't be sure. I asked in #hurd Freenode channel, and one person
suggested me to add this flags
Post by Samuel Thibault
- -fno-builtin-log
+ -fno-builtin-log --no-pie --no-pic
I'm surprised by the form of the option. I would have thought rather
-no-pie -fno-pic
which are documented, while the options above are not. Could you try
them instead?
Samuel
Samuel Thibault
2018-06-27 20:14:42 UTC
Permalink
I don't be sure. I asked in #hurd Freenode channel, and one person suggested me
to add this flags
Ok, but could you test these instead?

-no-pie -fno-pic

Samuel
Almudena Garcia
2018-06-27 20:15:12 UTC
Permalink
Ok, I'll try it
Post by Almudena Garcia
Post by Almudena Garcia
I don't be sure. I asked in #hurd Freenode channel, and one person
suggested me
Post by Almudena Garcia
to add this flags
Ok, but could you test these instead?
-no-pie -fno-pic
Samuel
Almudena Garcia
2018-06-27 20:27:48 UTC
Permalink
I've just to try the flags what you suggested, and this also runs correctly
Post by Almudena Garcia
Ok, I'll try it
Post by Almudena Garcia
Post by Almudena Garcia
I don't be sure. I asked in #hurd Freenode channel, and one person
suggested me
Post by Almudena Garcia
to add this flags
Ok, but could you test these instead?
-no-pie -fno-pic
Samuel
Samuel Thibault
2018-06-27 21:22:51 UTC
Permalink
Post by Almudena Garcia
I've just to try the flags what you suggested, and this also runs correctly
Cool, thanks for the test!

Samuel

Loading...