Skip to contentSkip to conversation

grub-1.97

DISCUSSION Bruce Dubbs 5 participants 10 messages Oct 28, 2009 – Oct 29, 2009

lore
Share & tools
lore
#0 lore raw

I am putting grub2 into the Linux From Scratch book and have built/tested it and it works quite well for us. Thank you.

I do have a question. After building a package, we like to test it for those packages that have tests built in. When I tried make test, I got an error about missing m2c. I then went to the Debian repository and built m2c. Now I get the error:

bdubbs@core2:/usr/src/grub/grub-1.97$ make test
m2c    -o test -e test test.mod
m2c: unknown flag `-e'
make: *** [test] Error 1

What version of m2c are you using and where is it available? Is this a valid way to run a regression test for grub-1.97?

I'd also like to make a comment. It may be useful if you split up the build into subdirectories by component. When I extracted the tarball, there were 57 files/directories in the top of the build tree. After configure it was 64. So far so good. However, after make it was over 2400 files, many with very long file names. This makes it almost impossible to navigate form the command line, even on a very big screen. If you split it up, you could also shorten the filenames. I would think that would be an advantage to encourage programmers to read the code and contribute to the project.

-- Bruce Dubbs
linuxfromscratch.org

#1 lore raw
Quoted 4 lines · Bruce Dubbs

I do have a question. After building a package, we like to test it for those packages that have tests built in. When I tried make test, I got an error about missing m2c. I then went to the Debian repository and built m2c. Now I get the error:

I don't see the string "m2c" anywhere in GRUB. This is part of the default 'make' rule for building Modula-2 programs, which is irrelevant here; it's an accident of how files happen to be named that it's used at all.

GRUB does not have a regression test suite.

Signature · 1 line
Colin Watson                                       [[email protected]]
#2 lore raw
Quoted 9 lines · Colin Watson
Quoted 1 line · Bruce Dubbs

I do have a question. After building a package, we like to test it for those packages that have tests built in. When I tried make test, I got an error about missing m2c. I then went to the Debian repository and built m2c. Now I get the error:

I don't see the string "m2c" anywhere in GRUB. This is part of the default 'make' rule for building Modula-2 programs, which is irrelevant here; it's an accident of how files happen to be named that it's used at all.

GRUB does not have a regression test suite.

Thanks for the confirmation. I had checked to see where m2c was used and couldn't find it either.

-- Bruce

#3 lore raw
In reply to Bruce Dubbs

2009/10/28 Bruce Dubbs <[email protected]>:

Quoted 16 lines

I am putting grub2 into the Linux From Scratch book and have built/tested it and it works quite well for us.  Thank you.

I do have a question.  After building a package, we like to test it for those packages that have tests built in.  When I tried make test, I got an error about missing m2c.  I then went to the Debian repository and built m2c.  Now I get the error:

bdubbs@core2:/usr/src/grub/grub-1.97$ make test
m2c    -o test -e test test.mod
m2c: unknown flag `-e'
make: *** [test] Error 1

What version of m2c are you using and where is it available?  Is this a valid way to run a regression test for grub-1.97?

Quoted 9 lines

I'd also like to make a comment.  It may be useful if you split up the build into subdirectories by component.  When I extracted the tarball, there were 57 files/directories in the top of the build tree.  After configure it was
64.  So far so good.  However, after make it was over 2400 files, many with very long file names.  This makes it almost impossible to navigate form the command line, even on a very big screen.  If you split it up, you could also shorten the filenames.  I would think that would be an advantage to encourage programmers to read the code and contribute to the project.

I guess it's meant to be used like this:

tar -jxvf grub-version.tar.bz2
cd grub-version
mkdir build
cd build
../configure --prefix=/some_prefix --options
make
make install

Now you have 2k files in the build directory but the ones that are useful can be found under /some_prefix

You can find the files installed under /some_prefix in the build directory so you can use them directly as well.

Many of the object files are replicated numerous times because of the way grub links its modules. This may be addressed at later time, there were some patches for simplifying this process.

I have no problems navigating the directory from command line although the layout does seem a bit odd. Maybe it's related to the fact I have some 700 files (excluding .files) in ~.

Thanks

Michal

#4 lore raw
Quoted 12 lines · Michal Suchanek

2009/10/28 Bruce Dubbs <[email protected]>:

Quoted 9 lines

I'd also like to make a comment. It may be useful if you split up the build into subdirectories by component. When I extracted the tarball, there were 57 files/directories in the top of the build tree. After configure it was
64. So far so good. However, after make it was over 2400 files, many with very long file names. This makes it almost impossible to navigate form the command line, even on a very big screen. If you split it up, you could also shorten the filenames. I would think that would be an advantage to encourage programmers to read the code and contribute to the project.

Quoted 7 lines

I guess it's meant to be used like this:

tar -jxvf grub-version.tar.bz2
cd grub-version
mkdir build
cd build
../configure./configure --prefix=/usr \

            --sysconfdir=/etc \
            --disable-largefile     \
            --disable-grub-emu      \
            --disable-grub-emu-usb  \
            --disable-grub-fstest   \
            --disable-efiemu --prefix=/some_prefix --options
Quoted 2 lines

make
make install

Yes, that is exactly what we are doing. Right now the configure line is

./configure --prefix=/usr           \
            --sysconfdir=/etc       \
            --disable-largefile     \
            --disable-grub-emu      \
            --disable-grub-emu-usb  \
            --disable-grub-fstest   \

--disable-efiemu

Quoted 2 lines

Now you have 2k files in the build directory but the ones that are useful can be found under /some_prefix

Right and 1200 of them are *.lst files, many of which have 30+ character filenames. Doing an ls puts everything in one column. Even if I expand my terminal to 269 characters, I only get 4 columns of files. It's just hard to navigate.

Quoted 2 lines

You can find the files installed under /some_prefix in the build directory so you can use them directly as well.

Yes, but you have to do ls -l|grep ^d just to find out what the directories are.

Quoted 3 lines

Many of the object files are replicated numerous times because of the way grub links its modules. This may be addressed at later time, there were some patches for simplifying this process.

Since there is only one Makefile, I could take a shot at creating a patch to address this problem. Would you be interested in such a patch?

-- Bruce

#5 lore raw

Am Mittwoch, den 28.10.2009, 11:02 -0500 schrieb Bruce Dubbs:

Quoted 3 lines

Since there is only one Makefile, I could take a shot at creating a patch to
address this problem. Would you be interested in such a patch?

That's wrong that there is just one Makefile. Well it's true that there is just one file named like that, but the main Makefiles are the conf/*.mk files generated from conf/*.rmk by genmk.rb.

There wasn't yet much talk about improving our build system. Bean just made it less complex in his lib branch (IIRC he called it something like that)
But except of this nobody had much interest/time to improve or even directly replace our build system by something better. Okuji already objected against automake because according to him it doestn't satisfy the needs for our build system.

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
#6 lore raw

Am Mittwoch, den 28.10.2009, 17:39 +0100 schrieb Felix Zielcke:

Quoted 9 lines

Am Mittwoch, den 28.10.2009, 11:02 -0500 schrieb Bruce Dubbs:

Quoted 3 lines

Since there is only one Makefile, I could take a shot at creating a patch to
address this problem. Would you be interested in such a patch?

That's wrong that there is just one Makefile. Well it's true that there is just one file named like that, but the main Makefiles are the conf/*.mk files generated from conf/*.rmk by genmk.rb.

Quoted 7 lines

There wasn't yet much talk about improving our build system. Bean just made it less complex in his lib branch (IIRC he called it something like that)
But except of this nobody had much interest/time to improve or even directly replace our build system by something better. Okuji already objected against automake because according to him it doestn't satisfy the needs for our build system.

Uhm correction: I totally forgot about Vladimirs one Makefile implementation.
Sorry Vladimir.

But IIRC even about this there wasn't much talk about.

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
#7 lore raw
In reply to Felix Zielcke
Quoted 7 lines · Felix Zielcke

Am Mittwoch, den 28.10.2009, 11:02 -0500 schrieb Bruce Dubbs:

Quoted 2 lines

Since there is only one Makefile, I could take a shot at creating a patch to address this problem. Would you be interested in such a patch?

That's wrong that there is just one Makefile. Well it's true that there is just one file named like that, but the main Makefiles are the conf/*.mk files generated from conf/*.rmk by genmk.rb.

Yes I see that now. Obviously I spoke before reviewing the internals of the build system. I'll review it in a bit more detail and see if I can contribute something useful.

Quoted 1 line

There wasn't yet much talk about improving our build system.

Yes, that and documentation are generally the last things to be considered in a project.

Quoted 2 lines

But except of this nobody had much interest/time to improve or even directly replace our build system by something better.

I have some interest, but I'm not sure of the time. I can at least look at it and possibly make some suggestions/patches.

Quoted 2 lines

Okuji already objected against automake because according to him it doestn't satisfy the needs for our build system.

I'm not a great fan of automake either.

-- Bruce

#8 lore raw
In reply to Bruce Dubbs
Quoted 35 lines · Bruce Dubbs
Quoted 19 lines · Michal Suchanek

2009/10/28 Bruce Dubbs <[email protected]>:

Quoted 6 lines

I'd also like to make a comment.  It may be useful if you split up the build
into subdirectories by component.  When I extracted the tarball, there were
57 files/directories in the top of the build tree.  After configure it was

Quoted 9 lines

64.  So far so good.  However, after make it was over 2400 files, many with
very long file names.  This makes it almost impossible to navigate form the
command line, even on a very big screen.  If you split it up, you could also
shorten the filenames.  I would think that would be an advantage to encourage programmers to read the code and contribute to the project.

Quoted 7 lines

I guess it's meant to be used like this:

tar -jxvf grub-version.tar.bz2
cd grub-version
mkdir build
cd build
../configure./configure --prefix=/usr \

           --sysconfdir=/etc \
           --disable-largefile     \
           --disable-grub-emu      \
           --disable-grub-emu-usb  \
           --disable-grub-fstest   \
           --disable-efiemu --prefix=/some_prefix --options

Quoted 1 line
Quoted 4 lines
Quoted 2 lines

make
make install

Yes, that is exactly what we are doing.  Right now the configure line is

Not "exactly", and the difference is important.Michal suggested running "../configure" with a double-dot meaning parent directory. Your line has only a single dot, meaning current directory. As a result your files are all mixed together instead of separated as intended.

Quoted 8 lines

./configure --prefix=/usr           \
           --sysconfdir=/etc       \
           --disable-largefile     \
           --disable-grub-emu      \
           --disable-grub-emu-usb  \
           --disable-grub-fstest   \
           --disable-efiemu

#9 lore raw
Quoted 18 lines · [email protected] wrote:
Quoted 17 lines · Bruce Dubbs
Quoted 7 lines · Michal Suchanek

I guess it's meant to be used like this:

tar -jxvf grub-version.tar.bz2
cd grub-version
mkdir build
cd build
../configure./configure --prefix=/usr \

           --sysconfdir=/etc \
           --disable-largefile     \
           --disable-grub-emu      \
           --disable-grub-emu-usb  \
           --disable-grub-fstest   \
           --disable-efiemu --prefix=/some_prefix --options
Quoted 2 lines

make
make install

Quoted 15 lines
Quoted 1 line

Yes, that is exactly what we are doing. Right now the configure line is

Not "exactly", and the difference is important.Michal suggested running "../configure" with a double-dot meaning parent directory. Your line has only a single dot, meaning current directory. As a result your files are all mixed together instead of separated as intended.

Quoted 7 lines
./configure --prefix=/usr           \
           --sysconfdir=/etc       \
           --disable-largefile     \
           --disable-grub-emu      \
           --disable-grub-emu-usb  \
           --disable-grub-fstest   \
           --disable-efiemu

Ah yes. Thank you Richard. Either systems works, but using a separate build directory keeps all the 2400 generated files out of the main directory. I'll change to that in LFS.

-- Bruce