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 Thu 30 Oct 2014, 10:51
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Compiled FTGL for Chromium. How to static build?
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Fri 25 May 2012, 04:21    Post_subject:  Compiled FTGL for Chromium. How to static build?  

I`m compiling Chromium into a mount dir., so I compiled FTGL files there in /lib.
The FTGL files are to go in the Chromium package. FTGL build has no *.a files.

I thought to add ( MntPt )/lib path to LD_LIBRARY_PATH so Chromium build would find it.
Seemed best for it to be where it will be used in the final build.

But when I run configure it says:
Code:
configure: error: cannot find GLC or FTGL >= 2.1.3 (text renderer)

Where do I put it to have it in the build? What to do to point configure to it?
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sat 26 May 2012, 05:49    Post_subject:  

I think it is something with

"-I/mnt/include -I/usr/local/include" ( Big "i" ) for CFLAGS=

and

"-L/mnt/lib -L/usr/local/lib" (Big "l" ) for LDFLAGS=

so

Code:
./configure --built=i486-pc-linux-gnu --host=i486-pc-linux-gnu --target=i486-pc-linux-gnu CFLAGS="-I/mnt/include -static" LDFLAGS="-L/mnt/lib"


but never forget to put pkg-name-FTLG.pc into /usr/lib/pkgconfig directory with the right ( actual) pointing contents

LDFLAGS and CFLAGS are written into these .
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Sat 26 May 2012, 13:23    Post_subject:  

Hi again Karl Godt; Some more clarification if possible...

-L will make the compiled app. look for the lib. that is in the make install dir.
So it should work okay as the lib is already in the dir. the app. is to be in.

Does -I make the lib get copied ( included ) into the target dir. at make install?
So it can be anywhere as it`s copied to the correct dir. in the build target dir.?
And then it essentially does what -L does to make the app. find the lib. there.
Or does it do something else? It seems like this is more what I`m trying to do.

Looked at the files in /usr/lib/pkgconfig, please explain:
LDFLAGS and CFLAGS are written into these ( files in /pkgconfig )..
Do I make a blank file for the FLAGS to be written to?
Or are these files in the source pkgs.?
Will they have to be modified by me to point to the correct places?
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 28 May 2012, 16:38    Post_subject:  

http://www.lehman.cuny.edu/cgi-bin/man-cgi?pkg-config+1
http://people.freedesktop.org/~dbn/pkg-config-guide.html
http://en.wikipedia.org/wiki/Pkg-config

Quote:
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: FTGL
Description: OpenGL frontend to Freetype 2
Version: 2.1.3~rc5
Libs: -L${libdir} -lftgl
Requires.private: freetype2
Libs.private: -lGLU -lGL -lm
Cflags: -I${includedir} -I${includedir}/FTGL


http://linux.windows9download.net/software-development/ftgl-124780.html

./configure

FTGL configured with the following settings:

Prefix: /usr/local
Binaries: /usr/local/bin
Configuration files: /usr/local/etc
Data files: /usr/local/share

CC = gcc
CXX = g++
CFLAGS = -g -O2 -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
CXXFLAGS = -g -O2
CPPFLAGS = -I${top_srcdir}/src -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare

---
./configure complete, type 'make' to begin building
ftgl-2.1.3~rc5-i686.tar.bz2
Description 
bz2

 Download 
Filename  ftgl-2.1.3~rc5-i686.tar.bz2 
Filesize  589.5 KB 
Downloaded  422 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 28 May 2012, 16:53    Post_subject:  

And chromium i quit after too many svn co breaks :

Code:
svn checkout http://chromium.googlecode.com/svn/trunk/ chromium-read-omly

gave me zillions of .wav files ... Twisted Evil

And thats the OS tarball it seems : 1,2GB
source tarball

.. giving up !
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Mon 28 May 2012, 18:27    Post_subject:  

Karl Godt; I`m looking at your links, starting to get a picture. here.

It seems odd to keep build info in the O.S. ( /pkfconfig ), but it`s normal for Unixes I guess.
Can`t see that it would ever need to be referenced for anything.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Mon 28 May 2012, 19:04    Post_subject:  

I am running full 99% of the time . have no interest to screw anything .

Tried to build a lot of xorg drivers once on a separate partition .

Was ok having all includes and libs on the OS .

Building chromium OS of 1.2 GB is beyond my current skills i guess .

*

What i don't understand : do you want FTGL built statically or chromium ?
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Mon 28 May 2012, 23:37    Post_subject:  

I guess I should have said that it`s Chromium the game, not the O.S.
Sorry about that...

If I could impose on you a little Karl, I`m a total noob at compiling.
I`m still trying to get an idea of the big picture.

I want to make "relatively" self contained apps. in Squash files.
Much like Tiny Core Linux`s SCM files.

technosaurus has been helping a lot. But compiling is still not working.

I have a bunch of Qs here: http://www.murga-linux.com/puppy/viewtopic.php?t=78318&start=30

### The main Qs on my mind:

# Using precompiled binary libs. doesn`t seem to work much of the time.
__ Is there a trick to using binary libs.?

# The best setup for making self contained SqApps seems to be:

Have a dir. with lots of libs. ( compiled or binary ) for building packages.
Copy needed libs. to /(PathToInstallDir)/lib
Use: LDFLAGS=-L/(PathToInstallDir)/lib ; configure --prefix /(PathToInstallDir)
LDFLAGS should point configure to the libs. copied to the install dir.
--prefix makes sure they`re found in the final package when the app. is run.
The install dir. is then made into a Squash file.

### Does this sound like a good setup? Or am I wrong about this?

All help is appreciated. Thank you very much... Terry B.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 29 May 2012, 02:23    Post_subject:  

Con you post a link to chromium the game, Terry ?

about the flags :

Code:
FLAGS=$FLAGS;export FLAGS;./configure

if you use semicolons.

or
Code:
FLAGS=$FLAGS ./configure


or
Code:
./configure FLAGS=$FLAGS


about the prefix :
if you want a standalone like
Code:
--prefix=/opt/chromium-version

with all the external included libs included in the /opt/chromium-directory ,
then i have to say, that i did not try to built such combination before .
Probably i would compile FTGL also with
--prefix=/opt/chromium-version
and all others too,
# make install them,

and build
chromium with
Code:
./configure LDFLAGS="-L/opt/chromium-version/lib -L/opt/chromium-version/usr/lib -L/opt/chromium-version/usr/local/lib" CFLAGS="-I/opt/chromium-version/usr/include" --prefix=/opt/chromium-version
make
make install
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Tue 29 May 2012, 03:50    Post_subject:  

Thank you so much for the complete code example. It helps a lot !

Chromium`s one of the dumb little game I got to develop SqApp build methods.
I don`t know if it`s really worth your time, it`s an arcade 2D space shooter.
http://linux.softpedia.com/get/GAMES-ENTERTAINMENT/Arcade/Chromium-B-S-U-9998.shtml
I got a number of games from there, some I`d really like to make work.
Some are Win. games in the Linux section, I assume they`re run by Wine.
I`ve tried Wine but never had much luck with it, once it trashed my partition.

# The SqApp setup I have mounts Squash files on: /SqApp/mnt/(PkgName)
The SqApp files have run scrips in them to mount & run, then unmount.
A setup script copies the run scripts to /SqApp/bin and icons to /SqApp/ico
and makes a few types of menu files. I made a stand alone menu in BaCon.

### If I could ask a few more Qs:

# Is there a trick to using binary libs.?
I`m using Puppy Lucid, so then using Ubuntu Lucid libs. is a good idea?

I guess Woof is supposed to be Ubuntu app. compatible, maybe it`s better.

# Are libs. and apps. built on glibc, musl, uclibc, etc, incompatible with libs.
and apps. built on any of the other Clibs? It could be a portability problem.

# A Q is... What to include in the build? X, xOrg stays out, but GTK+ has
new versions often, and many libs. have many versions ( lib. conflicts ).
OpenGL and Mesa ( games ) are both big I think, so they`re shared.
Obviously versions of apps. and libs. are sets, and any upgrade is global.

# I need really need complete tree files for the common apps... A BIG help.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 29 May 2012, 04:26    Post_subject:  

Yep this chromium is something else .

only 1.6MB src ..

but :

configure: error: cannot find OpenAL & ALUT or SDL Mixer (sound)

hmmmm ... will have a look for these ...

About wine : i managed to install wine by copying wine from

lighthousepup-443 to lupu-511

but it was a little struggle to find everything and to get the $HOME/.wine directory right .

About Ubuntu libs : I can not complain until now ..
libxml-2.6.32 from debian was missing a function - fopen64 or so - needed by rox
Back to top
View user's profile Send_private_message Visit_website 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Wed 30 May 2012, 02:55    Post_subject:  

Yes, It`s a real grab bag of lib. goodies.

I`m trying to do sdl-ball and lbreakout, and neither of them will work also.
Interestingly I`ve gone to using Ubuntu Lucid binaries as I`m using Puppy Lucid.
And they have the same errors as the games I`ve compiled. I guess that`s good.

# Lbreakout error: error while loading shared libraries:
libSDL_mixer-1.2.so.0: cannot open shared object file: No such file or directory

# But here: echo $LD_LIBRARY_PATH
./lib:/lib:/usr/lib:/usr/X11R7/lib:/root/my-applications/lib

# And here`s the dir.: ls /root/my-applications/lib
libmikmod.so.2 libSDL_image-1.2.so.0.8.2 libSDL_ttf-2.0.so.0.6.3
libmikmod.so.2.0.4 libSDL_image-1.2.so.0.8.2_Deb libsmpeg-0.4.so.0
libSDL-1.2.so.0 libSDL_mixer-1.2.so.0 libsmpeg-0.4.so.0.1.4
libSDL-1.2.so.0.11.3 libSDL_mixer-1.2.so.0.2.6 libx264.so
libSDL_image-1.2.so.0 libSDL_ttf-2.0.so.0 libx264.so.65

### Notice of course that:: libSDL_mixer-1.2.so.0 is in the path.

So what the heck is going on here? I doubting the reliability of all of this.
Does ld.so.cache have to be run? Does $LD_LIBRARY_PATH work or not?

Tiny Core linux doesn`t use $LD_LIBRARY_PATH, you`re not supposed to use it.
But they do use $LD_LIBRARY_PATH to make their SCM files find the libs.
.

Edited_times_total
Back to top
View user's profile Send_private_message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Wed 30 May 2012, 03:18    Post_subject:  

I think it will take more than LD_LIBRARY_PATH for many apps that require libs and other support files to be in particular locations. I'm assuming that you rebooted, ran ldconfig, etc. Are all the pkgconfig files correct?
Back to top
View user's profile Send_private_message 
sunburnt


Joined: 08 Jun 2005
Posts: 5039
Location: Arizona, U.S.A.

PostPosted: Wed 30 May 2012, 04:22    Post_subject:  

Thanks jpeps; I ran ldconfig and it fixed it.
I`ve got links for /usr/share/games and /var/games

Now it says:
Code:
ALSA lib confmisc.c:674:(snd_determine_driver) could not open control for card 0
ALSA lib conf.c:3326:(snd_config_hooks_call) function snd_config_hook_load_for_all_cards returned error: Input/output error

There`s a short list of these and then errors for sounds it can`t play of course.
As I see it, I have all the critical dirs. linked, so I`m stumped once again.

I think this Lbreakout game is very close to running the way I`ve got it rigged.

Forcing an app. to find it`s parts is tricky. Too bad they`re made this way.

Using binary libs. will work I think. Again, tricks to get the app. to use them.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Wed 30 May 2012, 15:01    Post_subject:  

Seems you run frugal and did too much alsaconf, which unloads the sound modules and loads them new .
Unloading often makes the kernel drivers do a mv or rm command to remove the /dev/snd* nodes, which can leave hidden "*.wh.*" files from the aufs driver in /dev or /dev/snd directory .

Code:
find /initrd/pup_rw -name "*.wh.*" -delete

should delete at least the .wh. files ( not the .wh. dirs )

Another thing is in my observations, that the sound drivers mainly create nodes in /dev directory directly, some apps still might try to find them in /dev/snd directory .

I have altered my /etc/init.d/alsa to create them in both :
http://murga-linux.com/puppy/viewtopic.php?p=536947&search_id=1404849847#536947

Code:
D=`find /sys -type d -name "*sound*"`
POOL=''
for i in $D ; do
DEV=`find $i -type f -name "dev" -exec echo -n {}@ \; -exec cat {} \; | tr ':' '@' | tr ' ' '@' -exec echo \; `
POOL="$POOL $DEV"
 done

POOL=`echo $POOL | rev`

for i in $POOL ; do
     NODE=`echo $i | cut -f 3 -d '@'`
     NODE=`echo $NODE | rev`
     NODE=`basename $(dirname $(echo $NODE) )`
     MAJ=`echo $i | cut -f 2 -d '@'`
     MAJ=`echo $MAJ | rev`
     Min=`echo $i | cut -f 1 -d '@'`
     Min=`echo $Min| rev`
     echo "$NODE" "$MAJ" "$Min"
     rm /dev/$NODE  ### 2>/dev/null
     mknod /dev/$NODE c $MAJ $Min
     rm /dev/snd/$NODE  ### 2>/dev/null
     mknod /dev/snd/$NODE c $MAJ $Min
    done
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1015s ][ Queries: 13 (0.0058s) ][ GZIP on ]