Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 29 Aug 2014, 16:27
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Hands on compiling xredit
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
goingnuts

Joined: 07 Dec 2008
Posts: 780

PostPosted: 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... Smile

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
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: 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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 780

PostPosted: 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
View user's profile Send private message Visit poster's website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2376
Location: UK

PostPosted: 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
View user's profile Send private message 
asok4uuu

Joined: 24 Aug 2011
Posts: 1

PostPosted: 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
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

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
[ Time: 0.0526s ][ Queries: 12 (0.0043s) ][ GZIP on ]