The time now is Sat 25 May 2013, 19:19
All times are UTC - 4 |
| Author |
Message |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Thu 30 Jun 2011, 15:59 Post subject:
Hands on compiling xredit |
|
xredit:
"This editor is a simple, but powerful editor to run under XWindows. It features an intuitive user surface with mouse support, multiple file editing, formatting service and makros."
Besides that it screams for some visual styling...
Download and unpack the source. Running make gives the following error:
/usr/lib/gcc/i486-t2-linux-gnu/4.2.2/../../../../i486-t2-linux-gnu/bin/ld: cannot find -lX11
Change CFFLAGS-line in makefile to:
| Code: | | CFLAGS=-Wall -DBLACK0 -DNOIBM -I/usr/include/X11 -L/usr/X11/lib -lX11 |
The -DBLACK0 -DNOIBM is specific for this program - just passing some settings...
Now it works. Stripped binary is 77K with this modest dependency list:
libX11, libc, libXau, libXdmcp and libdl.
The make file does not respond to "make clean". You have to delete files manually or add the following in the end of the makefile:
| Code: | clean:
rm -f xredit *.o
|
Note: The space before rm is a tab.
Lets make the binary smaller. Change CC-line in makefile to:
| Code: | | CC=gcc -Os -mtune=i386 |
Run make and strip - now binary is 56K - that's 25% smaller.
We could knock of another 1k by using sstrip
Anyone know how to make it smaller or how to compile with Xau and Xdmcp as static libs?
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 20 Jul 2011, 18:07 Post subject:
|
|
to compile xau and xdmcp as static, you should first build x11 to use the static libs, but you would need to add -fpic or -fPIC to CFLAGS when you compile them ... just delete their .so file so that the linker uses libXau.a etc...
otherwise there is no point, since libX11 has those as dependencies
chances are xau and xdmcp won't even need to be linked then.
if you link xau and xdmcp into x11, you may also want to replace them with symlinks to x11
keep in mind that this would be very nonstandard
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
goingnuts
Joined: 07 Dec 2008 Posts: 626
|
Posted: Thu 21 Jul 2011, 12:21 Post subject:
|
|
| technosaurus wrote: | | ...otherwise there is no point, since libX11 has those as dependencies... |
I see...thanks!
Wish one could edit post here as my first post could need some adjustments after testing in a fresh frugal P412 environment...
Why is that disabled here?
|
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2175 Location: UK
|
Posted: Thu 21 Jul 2011, 12:24 Post subject:
|
|
| goingnuts wrote: | | technosaurus wrote: | | ...otherwise there is no point, since libX11 has those as dependencies... |
I see...thanks!
Wish one could edit post here as my first post could need some adjustments after testing in a fresh frugal P412 environment...
Why is that disabled here? |
I'm avoiding posting here (except this, obviously) till it's sorted...
The mods are aware, but as yet, no action.
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
|
Back to top
|
|
 |
asok4uuu
Joined: 24 Aug 2011 Posts: 1
|
Posted: Wed 24 Aug 2011, 13:43 Post subject:
|
|
chances are xau and xdmcp won't even need to be linked then.
if you link xau and xdmcp into x11, you may also want to replace them with symlinks to x11
keep in mind that this would be very nonstandard
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|