yay, build complete. Now what ?
Dennis Clarke
dclarke at blastwave.org
Sun Jan 27 12:55:46 PST 2013
Firstly, let me say a gracious thank you to all who have listened, lurked, and
fired excellent emails at me over the past two weeks to get this to a simple and
very repeatable process. Should make a lovely article once I write it all up.
Certainly Alan and Peter have shown awesome patience and forgiveness as
I floundered forwards here. I will say, X is deep and wide.
This morning I was just thrilled to see :
aster $ rm -rf xorg/
aster $ rm -rf /opt/xorg/*
aster $ mkdir -p xorg/util
aster $ git clone git://anongit.freedesktop.org/git/xorg/util/modular xorg/util/modular
Cloning into xorg/util/modular...
remote: Counting objects: 2345, done.
remote: Compressing objects: 100% (1214/1214), done.
remote: Total 2345 (delta 1488), reused 1764 (delta 1125)
Receiving objects: 100% (2345/2345), 1.04 MiB | 542 KiB/s, done.
Resolving deltas: 100% (1488/1488), done.
aster $ cd $HOME/xorg
aster $ cd $HOME/xorg
aster $ CONFFLAGS=\-\-with\-udev\-rules\-dir\=/opt/xorg/udev
aster $ export CONFFLAGS
aster $ cp -p util/modular/build.sh util/modular/build.sh_backup
aster $ diff $HOME/build.sh util/modular/build.sh
858c858
< # build driver xf86-video-geode
---
> build driver xf86-video-geode
874c874
< # build driver xf86-video-i740
---
> build driver xf86-video-i740
879,880c879,880
< # build driver xf86-video-apm
< # build driver xf86-video-ark
---
> build driver xf86-video-apm
> build driver xf86-video-ark
893c893
< # build driver xf86-video-newport
---
> build driver xf86-video-newport
897c897
< # build driver xf86-video-s3
---
> build driver xf86-video-s3
901c901
< # build driver xf86-video-sis
---
> build driver xf86-video-sis
907c907
< # build driver xf86-video-vmware
---
> build driver xf86-video-vmware
aster $ cp -p $HOME/build.sh util/modular/build.sh
aster $ ./util/modular/build.sh --clone --autoresume built.modules /opt/xorg
Building to run Linux / x86_64 ()
Sat Jan 26 17:24:56 EST 2013
======================================================================
== Processing module/component: "util/macros"
== configuration options: --with-udev-rules-dir=/opt/xorg/udev
.
.
. * * * * * * * hours of good stuff later * * * * * * * * *
.
.
make[1]: Leaving directory `/home/dclarke/xorg/xkeyboard-config/man'
make[1]: Entering directory `/home/dclarke/xorg/xkeyboard-config'
make[2]: Entering directory `/home/dclarke/xorg/xkeyboard-config'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/opt/xorg/share/pkgconfig" || /bin/mkdir -p "/opt/xorg/share/pkgconfig"
/usr/bin/install -c -m 644 xkeyboard-config.pc '/opt/xorg/share/pkgconfig'
make[2]: Leaving directory `/home/dclarke/xorg/xkeyboard-config'
make[1]: Leaving directory `/home/dclarke/xorg/xkeyboard-config'
Sat Jan 26 20:07:18 EST 2013
I see in /opt/xorg a nice pile of X magic along with some bizarre things
under /opt/xorg/udev that I know I will have to deal with at some point.
aster $ ls -lap /opt/xorg/
total 56
drwxr-xr-x 10 dclarke adbs 4096 Jan 26 19:18 ./
drwxr-xr-x 5 root root 4096 Jan 18 22:58 ../
drwxr-x--- 2 dclarke adbs 4096 Jan 26 20:06 bin/
drwxr-x--- 4 dclarke adbs 4096 Jan 26 19:54 etc/
drwxr-x--- 11 dclarke adbs 4096 Jan 26 19:16 include/
drwxr-x--- 8 dclarke adbs 20480 Jan 26 19:26 lib/
drwxr-x--- 2 dclarke adbs 4096 Jan 26 18:38 sbin/
drwxr-x--- 14 dclarke adbs 4096 Jan 26 20:07 share/
drwxr-x--- 2 dclarke adbs 4096 Jan 26 19:18 udev/
drwxr-x--- 3 dclarke adbs 4096 Jan 26 17:24 var/
aster $ file /opt/xorg/bin/Xorg
/opt/xorg/bin/Xorg: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
aster $
aster $ readelf -hlStd /opt/xorg/bin/Xorg
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x439060
Start of program headers: 64 (bytes into file)
Start of section headers: 9044600 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 8
Size of section headers: 64 (bytes)
Number of section headers: 53
Section header string table index: 50
Section Headers:
[Nr] Name
Type Address Offset Link
Size EntSize Info Align
Flags
[ 0]
NULL 0000000000000000 0000000000000000 0
0000000000000000 0000000000000000 0 0
[0000000000000000]:
[ 1] .interp
PROGBITS 0000000000400200 0000000000000200 0
000000000000001c 0000000000000000 0 1
[0000000000000002]: ALLOC
[ 2] .note.ABI-tag
NOTE 000000000040021c 000000000000021c 0
0000000000000020 0000000000000000 0 4
[0000000000000002]: ALLOC
[ 3] .note.gnu.build-id
NOTE 000000000040023c 000000000000023c 0
0000000000000024 0000000000000000 0 4
[0000000000000002]: ALLOC
[ 4] .hash
HASH 0000000000400260 0000000000000260 6
00000000000058e0 0000000000000004 0 8
[0000000000000002]: ALLOC
[ 5] .gnu.hash
GNU_HASH 0000000000405b40 0000000000005b40 6
0000000000006310 0000000000000000 0 8
[0000000000000002]: ALLOC
[ 6] .dynsym
DYNSYM 000000000040be50 000000000000be50 7
0000000000015498 0000000000000018 1 8
[0000000000000002]: ALLOC
[ 7] .dynstr
STRTAB 00000000004212e8 00000000000212e8 0
000000000000f121 0000000000000000 0 1
[0000000000000002]: ALLOC
[ 8] .gnu.version
VERSYM 000000000043040a 000000000003040a 6
0000000000001c62 0000000000000002 0 2
[0000000000000002]: ALLOC
[ 9] .gnu.version_r
VERNEED 0000000000432070 0000000000032070 7
00000000000000e0 0000000000000000 6 8
[0000000000000002]: ALLOC
[10] .rela.dyn
RELA 0000000000432150 0000000000032150 6
00000000000034c8 0000000000000018 0 8
[0000000000000002]: ALLOC
[11] .rela.plt
RELA 0000000000435618 0000000000035618 6
00000000000022e0 0000000000000018 15 8
[0000000000000002]: ALLOC
[12] .rela.rela.plt
RELA 0000000000000000 00000000008a0fb8 51
00000000000022e0 0000000000000018 11 8
[0000000000000000]:
[13] .init
PROGBITS 00000000004378f8 00000000000378f8 0
0000000000000018 0000000000000000 0 4
[0000000000000006]: ALLOC, EXEC
[14] .rela.init
RELA 0000000000000000 00000000008a3298 51
0000000000000048 0000000000000018 13 8
[0000000000000000]:
[15] .plt
PROGBITS 0000000000437910 0000000000037910 0
0000000000001750 0000000000000010 0 4
[0000000000000006]: ALLOC, EXEC
[16] .text
PROGBITS 0000000000439060 0000000000039060 0
00000000001fe7a8 0000000000000000 0 16
[0000000000000006]: ALLOC, EXEC
[17] .rela.text
RELA 0000000000000000 00000000008a32e0 51
00000000000c9f48 0000000000000018 16 8
[0000000000000000]:
[18] .fini
PROGBITS 0000000000637808 0000000000237808 0
000000000000000e 0000000000000000 0 4
[0000000000000006]: ALLOC, EXEC
[19] .rela.fini
RELA 0000000000000000 000000000096d228 51
0000000000000018 0000000000000018 18 8
[0000000000000000]:
[20] .rodata
PROGBITS 0000000000637820 0000000000237820 0
000000000002a133 0000000000000000 0 32
[0000000000000002]: ALLOC
[21] .rela.rodata
RELA 0000000000000000 000000000096d240 51
000000000000f8b8 0000000000000018 20 8
[0000000000000000]:
[22] .eh_frame_hdr
PROGBITS 0000000000661954 0000000000261954 0
000000000000d30c 0000000000000000 0 4
[0000000000000002]: ALLOC
[23] .eh_frame
PROGBITS 000000000066ec60 000000000026ec60 0
0000000000034d54 0000000000000000 0 8
[0000000000000002]: ALLOC
[24] .rela.eh_frame
RELA 0000000000000000 000000000097caf8 51
0000000000027900 0000000000000018 23 8
[0000000000000000]:
[25] .ctors
PROGBITS 00000000008a4000 00000000002a4000 0
0000000000000018 0000000000000000 0 8
[0000000000000003]: WRITE, ALLOC
[26] .rela.ctors
RELA 0000000000000000 00000000009a43f8 51
0000000000000018 0000000000000018 25 8
[0000000000000000]:
[27] .dtors
PROGBITS 00000000008a4018 00000000002a4018 0
0000000000000010 0000000000000000 0 8
[0000000000000003]: WRITE, ALLOC
[28] .jcr
PROGBITS 00000000008a4028 00000000002a4028 0
0000000000000008 0000000000000000 0 8
[0000000000000003]: WRITE, ALLOC
[29] .data.rel.ro
PROGBITS 00000000008a4040 00000000002a4040 0
00000000000005a0 0000000000000000 0 32
[0000000000000003]: WRITE, ALLOC
[30] .rela.data.rel.ro
RELA 0000000000000000 00000000009a4410 51
00000000000007c8 0000000000000018 29 8
[0000000000000000]:
[31] .dynamic
DYNAMIC 00000000008a45e0 00000000002a45e0 7
0000000000000270 0000000000000010 0 8
[0000000000000003]: WRITE, ALLOC
[32] .got
PROGBITS 00000000008a4850 00000000002a4850 0
00000000000011a0 0000000000000008 0 8
[0000000000000003]: WRITE, ALLOC
[33] .got.plt
PROGBITS 00000000008a59f0 00000000002a59f0 0
0000000000000bb8 0000000000000008 0 8
[0000000000000003]: WRITE, ALLOC
[34] .data
PROGBITS 00000000008a65c0 00000000002a65c0 0
000000000000bbf0 0000000000000000 0 32
[0000000000000003]: WRITE, ALLOC
[35] .rela.data
RELA 0000000000000000 00000000009a4bd8 51
000000000001b0c0 0000000000000018 34 8
[0000000000000000]:
[36] .bss
NOBITS 00000000008b21c0 00000000002b21b0 0
000000000000fab8 0000000000000000 0 32
[0000000000000003]: WRITE, ALLOC
[37] .comment
PROGBITS 0000000000000000 00000000002b21b0 0
000000000000001c 0000000000000001 0 1
[0000000000000030]: MERGE, STRINGS
[38] .debug_aranges
PROGBITS 0000000000000000 00000000002b21cc 0
0000000000003c30 0000000000000000 0 1
[0000000000000000]:
[39] .rela.debug_aranges
RELA 0000000000000000 00000000009bfc98 51
0000000000003c30 0000000000000018 38 8
[0000000000000000]:
[40] .debug_pubnames
PROGBITS 0000000000000000 00000000002b5dfc 0
0000000000013bec 0000000000000000 0 1
[0000000000000000]:
[41] .rela.debug_pubnames
RELA 0000000000000000 00000000009c38c8 51
0000000000001e00 0000000000000018 40 8
[0000000000000000]:
[42] .debug_info
PROGBITS 0000000000000000 00000000002c99e8 0
000000000048c968 0000000000000000 0 1
[0000000000000000]:
[43] .rela.debug_info
RELA 0000000000000000 00000000009c56c8 51
00000000006a1328 0000000000000018 42 8
[0000000000000000]:
[44] .debug_abbrev
PROGBITS 0000000000000000 0000000000756350 0
00000000000344bb 0000000000000000 0 1
[0000000000000000]:
[45] .debug_line
PROGBITS 0000000000000000 000000000078a80b 0
000000000005b5ee 0000000000000000 0 1
[0000000000000000]:
[46] .rela.debug_line
RELA 0000000000000000 00000000010669f0 51
0000000000001e18 0000000000000018 45 8
[0000000000000000]:
[47] .debug_str
PROGBITS 0000000000000000 00000000007e5df9 0
000000000003bd9b 0000000000000001 0 1
[0000000000000030]: MERGE, STRINGS
[48] .debug_loc
PROGBITS 0000000000000000 0000000000821b94 0
000000000007d2b8 0000000000000000 0 1
[0000000000000000]:
[49] .debug_ranges
PROGBITS 0000000000000000 000000000089ee4c 0
0000000000001270 0000000000000000 0 1
[0000000000000000]:
[50] .shstrtab
STRTAB 0000000000000000 00000000008a00bc 0
00000000000001b5 0000000000000000 0 1
[0000000000000000]:
[51] .symtab
SYMTAB 0000000000000000 0000000001068808 52
00000000000339f0 0000000000000018 5178 8
[0000000000000000]:
[52] .strtab
STRTAB 0000000000000000 000000000109c1f8 0
0000000000021e66 0000000000000000 0 1
[0000000000000000]:
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
0x00000000000001c0 0x00000000000001c0 R E 8
INTERP 0x0000000000000200 0x0000000000400200 0x0000000000400200
0x000000000000001c 0x000000000000001c R 1
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
0x00000000002a39b4 0x00000000002a39b4 R E 200000
LOAD 0x00000000002a4000 0x00000000008a4000 0x00000000008a4000
0x000000000000e1b0 0x000000000001dc78 RW 200000
DYNAMIC 0x00000000002a45e0 0x00000000008a45e0 0x00000000008a45e0
0x0000000000000270 0x0000000000000270 RW 8
NOTE 0x000000000000021c 0x000000000040021c 0x000000000040021c
0x0000000000000044 0x0000000000000044 R 4
GNU_EH_FRAME 0x0000000000261954 0x0000000000661954 0x0000000000661954
0x000000000000d30c 0x000000000000d30c R 4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 8
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.ABI-tag .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
03 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss
04 .dynamic
05 .note.ABI-tag .note.gnu.build-id
06 .eh_frame_hdr
07
Dynamic section at offset 0x2a45e0 contains 34 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libudev.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgcrypt.so.11]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libpciaccess.so.0]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libdrm.so.2]
0x0000000000000001 (NEEDED) Shared library: [libpixman-1.so.0]
0x0000000000000001 (NEEDED) Shared library: [libXfont.so.1]
0x0000000000000001 (NEEDED) Shared library: [libXau.so.6]
0x0000000000000001 (NEEDED) Shared library: [libXdmcp.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000f (RPATH) Library rpath: [/opt/xorg/lib]
0x000000000000000c (INIT) 0x4378f8
0x000000000000000d (FINI) 0x637808
0x0000000000000004 (HASH) 0x400260
0x000000006ffffef5 (GNU_HASH) 0x405b40
0x0000000000000005 (STRTAB) 0x4212e8
0x0000000000000006 (SYMTAB) 0x40be50
0x000000000000000a (STRSZ) 61729 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x8a59f0
0x0000000000000002 (PLTRELSZ) 8928 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x435618
0x0000000000000007 (RELA) 0x432150
0x0000000000000008 (RELASZ) 13512 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x432070
0x000000006fffffff (VERNEEDNUM) 6
0x000000006ffffff0 (VERSYM) 0x43040a
0x0000000000000000 (NULL) 0x0
So this was all compiled on a Debian squeeze barebones virtual machine within
VMware with AMD Opteron processors. Should I be able to tarball up that whole
dir /opt/xorg and take it to my AMD Opteron based laptop running Debian wheezy
or would the kernel shift from rev 2.6.32-5-amd64 up to 3.2.0-4-amd64 be a new
nightmare?
Can I simply fire this up in the VMware virtual machine with a barebone xinit ?
Any suggestions ?
Dennis
ps: the fol sed/grep/cut foo shows me the 71 libs required within the entire Xorg
output stack and I should point out that a bucket of them are "not found" by ldd
due to an absent RPATH/RUNPATH in the ELF dynamic section. Not sure if that is
a concern or not :
aster $ find /opt/xorg -type f | xargs file | grep "ELF 64-bit" | cut -f1 -d\: | xargs ldd | grep -v "\:$" | sed 's/^[ \t]*//' | cut -f1 -d\( | cut -f1 -d\= | sort -u | cat -n -
1 /lib64/ld-linux-x86-64.so.2
2 libFS.so.6
3 libGL.so.1
4 libICE.so.6
5 libSM.so.6
6 libX11-xcb.so.1
7 libX11.so.6
8 libXau.so.6
9 libXaw.so.7
10 libXcomposite.so.1
11 libXcursor.so.1
12 libXdamage.so.1
13 libXdmcp.so.6
14 libXext.so.6
15 libXfixes.so.3
16 libXfont.so.1
17 libXft.so.2
18 libXi.so.6
19 libXinerama.so.1
20 libXmu.so.6
21 libXmuu.so.1
22 libXpm.so.4
23 libXrandr.so.2
24 libXrender.so.1
25 libXss.so.1
26 libXt.so.6
27 libXtst.so.6
28 libXv.so.1
29 libXvMC.so.1
30 libXxf86dga.so.1
31 libXxf86vm.so.1
32 libc.so.6
33 libcrypt.so.1
34 libdl.so.2
35 libdmx.so.1
36 libdricore9.1.0.so.1
37 libdrm.so.2
38 libdrm_intel.so.1
39 libdrm_nouveau.so.2
40 libdrm_radeon.so.1
41 libexpat.so.1
42 libffi.so.5
43 libfontconfig.so.1
44 libfontenc.so.1
45 libfreetype.so.6
46 libgcc_s.so.1
47 libgcrypt.so.11
48 libglapi.so.0
49 libgpg-error.so.0
50 libm.so.6
51 libmtdev.so.1
52 libpciaccess.so.0
53 libpixman-1.so.0
54 libpng12.so.0
55 libpthread.so.0
56 librt.so.1
57 libstdc++.so.6
58 libudev.so.0
59 libutil.so.1
60 libxcb-dri2.so.0
61 libxcb-glx.so.0
62 libxcb-randr.so.0
63 libxcb-render.so.0
64 libxcb-shape.so.0
65 libxcb-shm.so.0
66 libxcb-util.so.1
67 libxcb-xfixes.so.0
68 libxcb.so.1
69 libxkbfile.so.1
70 libz.so.1
71 linux-vdso.so.1
EXAMPLE of no RPATH :
aster $ readelf -d /opt/xorg/bin/xlsatoms
Dynamic section at offset 0x1a70 contains 22 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libxcb.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x400a68
0x000000000000000d (FINI) 0x4016a8
0x0000000000000004 (HASH) 0x400260
0x000000006ffffef5 (GNU_HASH) 0x400328
0x0000000000000005 (STRTAB) 0x400648
0x0000000000000006 (SYMTAB) 0x400360
0x000000000000000a (STRSZ) 380 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x601c30
0x0000000000000002 (PLTRELSZ) 528 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x400858
0x0000000000000007 (RELA) 0x400828
0x0000000000000008 (RELASZ) 48 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x400808
0x000000006fffffff (VERNEEDNUM) 1
0x000000006ffffff0 (VERSYM) 0x4007c4
0x0000000000000000 (NULL) 0x0
aster $ ldd /opt/xorg/bin/xlsatoms
linux-vdso.so.1 => (0x00007fff5c59e000)
libxcb.so.1 => not found
libc.so.6 => /lib/libc.so.6 (0x00007f3f8612e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3f86496000)
More information about the xorg
mailing list