LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware from Scratch and X11 (https://www.linuxquestions.org/questions/slackware-14/slackware-from-scratch-and-x11-4175560702/)

worsel 12-05-2015 01:10 AM

Slackware from Scratch and X11
 
4 Attachment(s)
I have succeeded in building X11 under Slackware from Scratch.
It was built in one step and seems to run fine. Blackbox came
up smoothly and there were no problems in the half hour I played
with it.

Still not sure that everything got built, but apparently nothing
vital was left out.

There were a few problems along the way:

1) Some programs, although not all, (didn't make a list :rolleyes: ),
needed LD_LIBRARY_PATH="/lib64:/usr/lib64" to find the
libraries.

2) Mesa needs libelf, which doesn't seem to be in -Current.
I used the source package from SW-14.1.

3) I had to recompile m4 and libtool. They thought they
should be in the tools directory which had been deleted.

4) Can't read my own handwriting. :o Anyway, two files (invocation.cpp
and radeon-elf-util.c) needed "include <gelf.h>" and
"include <libelf.h>" changed to "include <libelf/gelf.h>"
and "include <libelf/libelf.h>" respectively. I'll try to
run them down tomorrow. (It's midnight here in Washington state.)

5) xserver needed libepoxy installed.

6) Also had to recompile glib2 before gtk-pixbuf2 would compile.

The list and scripts I used are attached. If anyone wants to use
them, be careful. They're quite picky about changes and I'm not to
sure that the build order is optimal.

Worsel

worsel 12-05-2015 01:13 AM

Oops another file
 
1 Attachment(s)
This one didn't want to go! :redface:

nobodino 12-05-2015 06:59 AM

comments:
- nice job!
- 2/ and 4/ did you install elfutils? libelf was for Sl-14.1 and elfutils for Sl-14.2 (current)
- 2/ if you built mesa only once, I think mesa-demo doesn't build. You may build it once, install it and build a second time to have mesa-demo built, and then upgradepkg mesa (maybe a second "x mesa" after "x freeglut" in your build5list?)
- I'm surprised you manage to build "dbus" directly, without the need to modify the SlackBuild and execute "dbus-uuidgen --ensure" to build dbus-glib/dbus-python?
- did you manage to build xcm-0.5.2?
- at the end, everything should compile without a hitch, on x32 version, at least.

worsel 12-05-2015 07:19 PM

Aah, peer review. It's a wonderful thing. :cool:

Quote:

- 2/ and 4/ did you install elfutils? libelf was for Sl-14.1 and elfutils for Sl-14.2 (current)
No. Somewhere I missed this one. Looked for it too, when I couldn't fined libelf on the
64 bit system. Probably because I didn't know what to look for. Wonder what else I missed? :study:

Cancel 4) above. With elfutils installed, it should build without modifying the files.
Don't know if a 32 bit build needs the files changed or not.

Quote:

- 2/ if you built mesa only once, I think mesa-demo doesn't build.
You are correct. Mesa-demo did not build.

Quote:

- I'm surprised you manage to build "dbus" directly, without the need to modify the SlackBuild and execute "dbus-uuidgen --ensure" to build dbus-glib/dbus-python?
- did you manage to build xcm-0.5.2?
Okay, I missed commenting on this. I did modify dbus per your instructions. "dbus-uuidgen --ensure" was in my scripts somewhere. Must have deleted it
and not noticed. Still dbus-glib & dbus-python seemed to build normally.

Yes, xcm-0.5.2 compiled. At least it made a package that appears to be okay visually. I'll test it later today.

I will correct my system and rebuild X11. Probably won't happen until sometime next week with my schedule. :(

bassmadrigal 12-07-2015 12:51 AM

Quote:

Originally Posted by worsel (Post 5460053)
Still not sure that everything got built, but apparently nothing
vital was left out.

You should be able to check /tmp/x11-build for any *.failed files to see if anything failed to build.

Code:

ls -la /tmp/x11-build/*.failed

worsel 12-09-2015 10:20 PM

Quote:

You should be able to check /tmp/x11-build for any *.failed files to see if anything failed to build.
Why didn't I think of this before removing /tmp/x11-build? :banghead:

nobodino 12-13-2015 01:18 AM

Is net-tools working correctly, as it should?
Don't you have that kind of message:

root@darkstar_noob:/tmp# ifconfig
No usable address families found.
socket: Success

Id doesn't compile correctly in slackware as well.

Solution:
grab sources from debian net-tools_1.60+git20150829.73cef8a.orig.tar.gz and net-tools_1.60+git20150829.73cef8a-2.debian.tar.xz, apply the patches and it builds and works normally.

SlackBuild modified with:

# debian patches
zcat $CWD/Bug#805377-man-pt_BR-ifconfig.8.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/Bug#541172-netstat.c-exit-codes.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/translations.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/Add_missing_headers.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/Bug#443075-ifconfig.c-pointtopoint_spelling.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/Bug#500913-man-en_US-route.8-EXAMPLES-Add-single-route-del.patch.gz | patch -p1 --verbose || exit 1

nobodino 12-13-2015 05:41 AM

1 Attachment(s)
I've updated the build of "Slackware from scratch" memo. I did it manually this time, didn't use my scripts to see what's new.
It's been built from LFS-7.8 for the first part and slackware-current up to 03/12/2015 for the build of Slackware.
There are fewer patches, but new ones.
Works pretty well.

worsel 12-13-2015 10:23 PM

Sorry I couldn't get right back to you, but I see you found a solution for net-tools.
Better than mine. I went in and modified "by hand".

Your new memo looks good. I'm going to rebuild mine from "scratch" (No pun intended)
after the 1st of the year. Just as soon as I find time.

nobodino 12-21-2015 01:20 AM

1 Attachment(s)
I've updated the second part, the building of X11 up to xfce functional.
No problem with building X11, no *.failed package if you respect the correct order described here under.
Couldn't get llvm-3.7.0 to build, get back to 3.6 version.
Very few SlackBuilds modified.

nobodino 02-07-2016 05:59 AM

2 Attachment(s)
I've improved the memos to build slackware from scratch. They are rather clean now, I believe.
No more x11 failure, just a few patches included.
The system has complete gcc subsystem, and the xfce environment.
Feel free to test.

worsel 02-11-2016 04:02 PM

Looks good, Nobodino.

I modified my scripts to follow your latest. Didn't take much for the first part.
Last night I built the basic system with no problems. In the next couple of days
I'm going to do the X11 section.

Up to installing BlackBox, it seems pretty much the same. Some work to do after that
though.

nobodino 02-12-2016 09:28 AM

Please, share your scripts when you've finished the two parts. I'm interested in.

worsel 02-15-2016 12:59 AM

Nobodino,

In your second text you call for a patch to rcs, upstream-260704a916.diff.gz.

I can't seem to locate this patch. Would you be so kind as to provide a link?

TIA,

Worsel

nobodino 02-15-2016 01:16 AM

1 Attachment(s)
see enclosed diff.

worsel 02-24-2016 11:37 PM

re: Slackware from Scratch again
 
4 Attachment(s)
Rebuilt Slackware from Scratch, using Slackware-current,
downloaded February 8, 2016. I know there have been
upgrades since, but I like to keep my sources stable
for the duration of a build.

Problems found were:

1. I missed that libarchive had been moved to build list 2
and had to add "--without-archive" to the slackbuild
and rebuild in list 3.

2. Had to build eudev early. Wget would not compile. Disabled
introspection for the first build.

3. Had to rebuild libpng-1.6.20 before cmake would work.

4. The tix patch you gave would not work for me, Nobodino. Don't
know what I was doing wrong. Anyway I went in and removed those
two pesky exclamation marks by hand.

5. Had a hard time finding p2c-1.22. Finally found it on the
Madiera sight. p2-1.22-26.mga6.src.rpm.

6. Doxygen was okay after I wrote my own SlackBuild.

Anything else has been previously covered by myself or Nobodino.

There were a number of other problems, mostly pebkac's. The
biggest one though, was finding time to do this. It was fun however.

Nobodino, my scripts are attached. Also patches for all the
SlackBuilds we change. Enjoy!

worsel 02-24-2016 11:44 PM

1 Attachment(s)
Goofed again. Forgot this thing can't tell
one file from another without a suffix.
Oh, Well. . . .:rolleyes:

nobodino 02-25-2016 02:36 AM

It looks good to me.
That's what I couldn't do myself: make "nice" scripts with my memos.
I do appreciate the job done.

nobodino 02-25-2016 02:39 AM

oups!

worsel 02-26-2016 12:46 AM

Ran into two problems with SFS today.

1. Dialog somehow became linked to libncursessw-6.0. Had to recompile.

I think this happened because I did not delete the tools directory
in time. It probably should be deleted as soon as we build gcc.
Can't see that it should be used after that.

2. Xdm would boot me into root, but not user.

The error message was "XDM authorization key matches an existing
client![fvwm][main]: <<ERROR>> can't open display :0"

A search on the internet led me to a BSD message recommending
slim instead of gdm or kdm. I grabbed it from Slackbuilds.org,
installed it, and lo ... it worked!

On the other hand I got fvwm, firefox, and thunderbird working.

nobodino 02-27-2016 08:15 AM

1 Attachment(s)
a little improvement to your patches. Just rename the file.txt in file.sh (chmod +x file.sh) and ./file.sh and look at the result.

worsel 02-27-2016 11:41 PM

Okay, I knew about that. Guess I got on a track and
forgot to get off.

worsel 03-05-2016 12:10 AM

Nobodino,

In your bbp20062015.txt, you indicated that both gstreamer and gstreamer0 needed their
SlackBuilds modified. I found the patch for gstreamers0 and blindly (I believe that is
a euphemism for stupidly) applied the patch to both SlackBuilds. If this was not the
intent, please advise.

TIA

nobodino 03-05-2016 04:51 AM

no, it was just gtreamer0 which was concerned by the patch.

Otherwise, I rebuild sfs with your scripts and simplify them for my purpose. You will see it.

worsel 03-09-2016 01:52 PM

Slackware from Scratch and X11
 
Rebuilt SFS using slackware64-current dated 2016-03-04.

The only new problem was net-tools. To compile it I had to
build libical and bluez just before net-tools.

I noticed that several X programs complain that doxygen does
not exist. Might it not be a good idea to build doxygen before
building X? I'll test this with my next build.

nobodino 03-10-2016 12:53 AM

1 Attachment(s)
Concerning net-tools see the new patch file enclosed. You'll know how to use it.

hendrickxm 03-11-2016 01:56 AM

I already succesfully rebuild a fairly minimal slackware install before and the instructions here are very nice.
There is something I would like to try but cannot seem to find out how. I want to install a minimal slackware build and chroot into it and continue building. Meaning to installpkg from a non-slackware host and add all needed packages to rebuild themself.
You could get the same by doing a minimal install, boot a livecd and chroot from there.
Firstly, could someone provide me a list of packages needed for slackware such that the resulting system is able to rebuild itself? Containing enough to have a lfs-like system.
Next question, what would be the easiest way to get pkgtools installed on a non-slackware distro, without untarring slackware packages.

My guess would be to install tar-1.13 and copy the installpkg (and makepkg) script(s) on the host/livecd system.
Minimal list is kinda available in the notes provided by nobodino.

worsel 03-11-2016 04:56 PM

hendrickxm,

Thank you!

For your first question, I don't know that continuing in chroot after my sfsbuild4.sh script (see previous posts in this thread for scripts)j
is wise. (This is equivalent to finishing nobodino's "slackware from scratch -v03022016-first.txt" listing. (also available earlier in this thread).
At this point I reboot into the newly built system. It is fully capable of rebuilding itself at this point.

To continue after this point without rebooting probably requires some sort of virtual machine software. I've no experience with such. For more
info see my post in the bedrock linux forum.

For your second question, I believe your guess is correct. Take care though, programs don't always install smoothly on alien systems!

hendrickxm 03-12-2016 01:44 PM

Thanks for your reply.
My idea is to get pkgtools on a host distro (livecd), install a list of packages (original slackware-current packages), similar as the one nobodino to build the chrooted environment, chroot into the system and rebuild the system, then add up to whatever I need.
And to get pkgtools (actually installpkg is enough) I guess adding tar-1.13 and the installpkg script should do it. If not, I can try with a livecd from zenwalk, slax, salix, ... that has pkgtools.

nobodino 03-14-2016 01:44 AM

5 Attachment(s)
A new update for "Slackware From Scratch", now the process is rather "automatic". I used Worsel's scripts and adpated them to an x86 system and simplified a little bit. There's no more tricks in the beginning of the process of building, it is clean.
Glibc is built from the beginning.
Tar-1.13 and which are included in "tools" to able to build cleanly the first seeds of slackware: makepkg, etc, aaa_base and glibc.

From now I've just done it for the first part.
You can try it, and if you're as lazy as I am, you just need a "resynced slackware repository", build LFS up to chapter 5 and execute about 10 scripts.

hendrickxm 03-14-2016 02:42 AM

Thanks, great stuff. I managed to use a livecd, added tar-1.13 and the installpkg script. Then used installpkg --root /mnt/chroot *.txz and chrooted into it.
Now I will rebuild in the chroot.
Do you have the packages and slackbuilds you have used and build and can you share them?

Compared to LFS, what packages are absolutely needed to have a system that is capable to rebuild itself. I see elflibs, aaa_base, pkgtools, etc, bin, net-tools, perhaps sudo, curl, openssl, ...?

nobodino 03-14-2016 05:10 AM

Read the memos called *-first and *-second I already posted, the minimum is explained to be able to build sfs and remove 'tools'.I noticed you forgot 'which'. By the end of *-second memo, you should be able to remove 'tools',boot in your new sfs and build everything. I hope the answer is clear for you?

worsel 03-15-2016 01:56 PM

Nobodino,

Just read over your latest. Looks good. The only questions I had
were minor nitpicks. Managed to answer them myself. Keep up the
good work.

worsel 03-17-2016 03:09 PM

Slackware from Scratch and X11
 
Nobodino,

An apology. . .In the last batch of scripts I inadvertently sent the original sfsinit.sh instead of the debugged one.
You seem to have accomodated it, but . . . . :redface:

Attached are a corrected sfsinit.sh, an new build5.list, and sfsbuild5.sh.

The sh is the beginning of collapsing all my sh's down to one or two.
Build5.list is the X system broken out to individual files. Hope I got them all :scratch:

nobodino 03-18-2016 01:27 AM

"Attached are a corrected sfsinit.sh, an new build5.list, and sfsbuild5.sh?"
Sorry, I don't see any attached file.

worsel 03-18-2016 01:45 AM

Slackware from Scratch and X11
 
3 Attachment(s)
Huh, wonder what happened?
They were there when I hit the send button.

Oh, well, here they are. . .

nobodino 04-04-2016 12:43 AM

5 Attachment(s)
Another update to Slackware From Scratch.
I simplified the process and merged the different steps (sfsbuild0 to sfsbuild4) and there's only one build.list to achieve the build process.
There's less tricks: a real kernel-header package, adjust, sfselflibs are treated as package.
It works on the last current slackware version 01/04/2016 and LFS version 13/03/2016.

archfan 04-04-2016 11:54 AM

Thanks for putting this information out there. Really useful stuff. I'm gonna use this to finish my Slackbuild musl build in the near future.

+1

bormant 04-04-2016 05:02 PM

@nobodino

don't use # in middle of multiline command as in patches-sfs.sh
Code:

@@ -70,7 +70,7 @@
 ../bootstrap \
  --prefix=/usr \
  --docdir=/doc/$PKGNAM-$VERSION \
-  --qt-gui \
+#  --qt-gui \
  --system-curl \
  --system-expat \
  --no-system-jsoncpp \
@@ -87,7 +87,7 @@
  ../configure \
  --prefix=/usr \
  --docdir=/doc/$PKGNAM-$VERSION \
-  --qt-gui \
+#  --qt-gui \
  --system-curl \
  --system-expat \
  --no-system-jsoncpp \
EOF

# breaks command. You can test:
Code:

#!/bin/sh
echo \
  --1 \
  --2 \
# --3 \
  --4 \
  --5

Code:

$ sh tst.sh
--1 --2
tst.sh: line 7: --4: command not found

The line after # is a new command.

worsel 04-04-2016 08:03 PM

Nobodino,

Please check scripts-sfs.sh.txt. When I run it, I don't get the same
results that you show in the README file. Otherwise looks great.
I've been slowly working on something like this, but have had limited
time for it. Keep up the good work!

Worsel

nobodino 04-07-2016 12:15 PM

5 Attachment(s)
Test with these files.
Only 3 scripts remains: initsfs.sh (and not sfsinit.sh), ch6prep.sh and sfsbuild1.sh.
All other scripts are secondary scripts called by the 3 ones above.

worsel 04-10-2016 01:46 AM

Slackware from Scratch and X11
 
1 Attachment(s)
Nobodino,

I haven't had much time recently for this, but I did review your latest.
Looks good. Haven't been able to try it yet.

The attachment is something I cooked up while waiting for my car to be
repaired. It goes back to LFS and builds a tools directory using only
Slackware64 current sources, except for check and dejagnu.

nobodino 04-17-2016 09:06 AM

5 Attachment(s)
Another update to Slackware From Scratch.
It works on the lastet current slackware version 15/04/2016 and LFS version 12/04/2016.
The file for the patches has not changed.
This time , the process is a bit different, no more sub-scripts.
The 3 scripts are built with procedures: one to init, one to chroot, one to build, and that is all.
The differences are in the details, so look carefully.

nobodino 04-19-2016 01:46 AM

error in README to build sfs:
time (./sfsbuild1.sh build1.list) # don't forget the build1.list

worsel 04-21-2016 04:49 PM

Slackware from Scratch and X11
 
1 Attachment(s)
In your script, sfsbuild1.sh, you question why the glibc tests don't work.

Quote:

test-glibc )
# doesn't work, doesn't wait for the answer??
test_1
answer
test_2
answer
test_3
answer
test_4
answer
test_5
answer
test_6
answer
test_7
answer ;;
It doesn't work because you are already redirecting stdin. Can't do it
again in the same loop. The attached patch contains one solution:
(amongst other things. I'm doing a 64 bit build where you are doing 32 bit.)

Look at the patch from "LISTFILE =" down. What I did was read the list into
an array, then processed the array instead of trying to reuse stdin. Got the
idea from the "Advanced Bash Scripting Guide", which I believe is available in french.

slackerDude 04-21-2016 09:51 PM

Sorry for the intrusion - just curious what the purpose of this project/task is? Is there a performance benefit? Or are you doing it for some other reason?

worsel 04-22-2016 12:12 AM

Quote:

Sorry for the intrusion - just curious what the purpose of this project/task is? Is there a performance benefit? Or are you doing it for some other reason?
Speaking only for myself, fun and learning.

Worsel

nobodino 04-22-2016 04:40 AM

Worsel: tested your patch for "test_glibc", it worked just now.

Concerning the reason why I'm doing it: just learning.

Alien Bob 04-22-2016 05:07 AM

Fun and learning are the best motivators I think. If the fun stops or you think there is nothing more to be learnt, that is when innovation stops.

worsel 04-23-2016 11:28 PM

Nobodino,

First the good news: I adapted your latest script to build slackware64-current, using sources downloaded 2014/04/18.
The build ran to completion showning no errors. Also it boots and runs.

Now the bad news:
1. Had to add "export LD_LIBRARY_PATH="/lib64:/usr/lib64" near the top of sfsbuild1.sh to get ghostscript to build.
2. Had to add the patch "jadetexbuild.patch" to sfsinit.sh to get jadetex to build. Did you really build
slackware without this patch? If so, the build works differently on 32 bit vs 64 bit.
3. Have to hit "^C" to complete the boot. It's geting late here so I'll look into this tomorrow.
4. Also cannot connect to the internet. "ifconfig eth0" returns an error message about 'not finding the device'.

Still a good job. Thanks

Worsel


All times are GMT -5. The time now is 12:42 AM.