* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
@ 2016-05-02 15:57 Peter Thompson
2016-05-02 16:14 ` Gustavo Zacarias
0 siblings, 1 reply; 7+ messages in thread
From: Peter Thompson @ 2016-05-02 15:57 UTC (permalink / raw)
To: buildroot
I am trying to install the SDL2 suite (SDL2, SDL2_gfx, SDL2_image,
SDL2_ttf) using Buildroot-2016-02. SDL2 is incorporated into
Buildroot-2016-02. SDL2_gfx and SDL2_image are relatively straight
forward to add, but SDL2_ttf is being problematic. SDL2_ttf can't/won't
use libpng16.
I manually compiled libpng-1.2.56 and freetype-2.6.3 and used those (and
buildroot staging) to compile SDL2_ttf.
It compiled ok, as did my application but now I get runtime error messages
when running my test application on my igepv2 board.
libpng warning: Application built with libpng-1.2.56 but running with 1.6.21
SDL message:: unable to load viewsensor.png:: Couldn't allocate memory for
PNG file or incompatible PNG dll
My questions are:
1. Can I change Buildroot-2016-02 to use libpng12 instead of libpng16? I
looked at libpng dependencies in Buildroot and they are HUGE! I see no
easy way to change to libpng12.
2. Does an earlier version of buildroot use libpng12? Should I use that?
I would miss having SDL2 available in buildroot - I had problems compiling
that earlier.
3. Should I use buildroot to build a barebones rootfs without libpng and
create what I need from there. Looking briefly at the dependencies, I am
not sure that is possible.
I checked Ubuntu on which my application works fine. It runs with libpng12
only.
===========================================================================
Below are my personal notes which I used to create SDL2_ttf...
[Free Electons] refers to course notes from Free Electrons that I still
use.
===============================================================================
Step 1 Download SDL2_ttf & png-1.2.56.tar.gz
-----------------------------------------------
SDL2_ttf-2.0.12.tar.gz
libpng-1.2.56.tar.gz ##NOTE libpng12 needed by SDL2_ttf.
## Buildroot provides libpng16
cd 94SDLttf
tar -xvzf SDL2_ttf-2.0.12.tar.gz
tar -xvzf libpng-1.2.56.tar.gz
echo $PATH
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
# Buildroot requires glibc (Error IPV6 required)
- will not work against uclibc
arm-linux-gcc -print-search-dirs ==>
Step 2 - compile libpng (see Free Electrons)
------------------------------------------------
cd libpng-1.2.56/
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
export CC=arm-linux-gcc
export
CPPFLAGS=-I/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/staging/usr/include
export LDFLAGS=-L/home/peter/igep2015/94SDLttf/pmtstaging/usr/lib/
export CFLAGS=-Wl,--verbose
./configure --host=arm-linux --prefix=/usr
make
make DESTDIR=/home/peter/igep2015/pmtstaging/ install
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libpng12.so*
/home/peter/igep2015/pmtroot/usr/lib/
arm-linux-strip /home/peter/igep2015/pmtroot/usr/lib/libpng12.so.0.56.0
NOTE::: Don't forget to add the fonts to pmtroot (copy from Ubuntu)
cp /usr/share/fonts/truetype/freefont/*.*
~/igep2015/pmtroot/usr/share/fonts/truetype/freefont/
Step 2 - compile freetype-2.6.3 (see Free Electrons)
------------------------------------------------------
cd freetype-2.6.3
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
export CC=arm-linux-gcc
export
CPPFLAGS=-I/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/staging/usr/include
export LDFLAGS=-L/home/peter/igep2015/94SDLttf/pmtstaging/usr/lib/
./configure --host=arm-linux --prefix=/usr
make
make DESTDIR=/home/peter/igep2015/94SDLttf/pmtstaging/ install
make DESTDIR=/home/peter/igep2015/pmtstaging/ install
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libfreetype.so*
/home/peter/igep2015/pmtroot/usr/lib/
arm-linux-strip /home/peter/igep2015/pmtroot/usr/lib/libfreetype.so.6.12.3
*******************************************************************
****************** Finally what I want - SDL2_ttf ******************
*********************************************************************
Step 3 - compile SDL2_ttf (see Free Electrons DirectFB for ideas)
-------------------------------------------------------------
cd ~/igep2015/94SDLttf/SDL2_ttf-2.0.14/
######################################################################
##### change 2 linker scripts in Buildroot #### see stackoverflow by peter
####
Change
/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/lib/libc.so
FROM:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED (
/lib/ld-linux.so.3 ) )
TO:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( ../../lib/libc.so.6 libc_nonshared.a AS_NEEDED (
../../lib/ld-linux.so.3 ) )
Change
/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/lib/libpthread.so
FROM:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( /lib/libpthread.so.0 /usr/lib/libpthread_nonshared.a )
TO:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( ../../lib/libpthread.so.0 libpthread_nonshared.a )
################################################################
### create pmtstaging - if not done before ###
cp -a
/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot
/home/peter/igep2015/
mv /home/peter/igep2015/sysroot /home/peter/igep2015/pmtstaging
#################################################################
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
export CC=arm-linux-gcc
export CFLAGS="-v -Wl,--verbose" ###optional for debugging
export CPPFLAGS="-I/home/peter/igep2015/94SDLttf/pmtstaging/usr/include
-I/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/include
-I/home/peter/igep2015/94SDLttf/pmtstaging/usr/include/freetype2"
export
LDFLAGS="-L/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/lib
-L/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/lib
-L/home/peter/igep2015/94SDLttf/pmtstaging/usr/lib"
./configure --host=arm-linux --prefix=/usr
--with-freetype-prefix=/home/peter/igep2015/94SDLttf/pmtstaging/usr
make
make DESTDIR=/home/peter/igep2015/pmtstaging/ install
YIPPEEEE YIPPPEEEEE ---- IT WORKS!!! AFTER 3+ WEEKS OF WORK *****
Step 6 - transfer libs to igpev2
--------------------------------
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_ttf-2.0.so*
/home/peter/igep2015/pmtroot/usr/lib/
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_ttf.so
/home/peter/igep2015/pmtroot/usr/lib/
arm-linux-strip
/home/peter/igep2015/pmtroot/usr/lib/libSDL2_ttf-2.0.so.0.14.0
=================================================================================
Compile the application
=================================================================================
export PKG_CONFIG_PATH=/home/peter/igep2015/pmtstaging/usr/lib/pkgconfig/
arm-linux-gcc viewtestARM.c SDL2init.c -o viewtestARM -Wl,--verbose
--sysroot=/home/peter/igep2015/pmtstaging/ $(pkg-config --libs --cflags
sdl2) $(pkg-config --libs --cflags SDL2_gfx) $(pkg-config --libs --cflags
SDL2_image) $(pkg-config --libs --cflags SDL2_ttf)
==============================================================================
Buildroot configuration used
=========================================================================
Target Options
Target Architecture: ARM (little endian)
Target ARchitecture Variant: arm926t
Target ABI: EABI
Floating point strategy Soft float
ARM instruction set ARM
Build options --ignore
please enable BR2_TOOLCHAIN_HAS_SSP [peter ? why needed - not sure??]
after toolchain built below
Toolchain
Toolchain type: External toolchain
Toolchain: Custom toolchain
Toolchain origin: Pre-installed toolchain
Toolchain path: /usr/local/xtools/arm-unknown-linux-gnueabi
Toolchain prefix: arm-linux OR #normally is $(ARCH)-linux
==> arm-linux
External toolchain gcc version: (see arm-linux-gcc --version OR
OR arm-linux-gcc -xc -v ==> 5.1.x
External toolchain kernel headers series: (.../sysroot/usr/include/ )
==> 4.0.x
External toolchain C library: uClibc OR glibc --> see 00README for
which machine
NOTE with glibc several options below are already included eg
WCHAR, locale
enable[Free Electrons] large file support, RPC support, C++ support
enable[peter] WCHAR,locale,
enable copy gdb server to Target, enable MMU support,
Target linker options: NONE
System Configuration
System hostname: PMTigepv2
System banner PMTigepv2 - Jan 23, 2016 {ie build date}
enable Dynamic using devtmpfs + mdev
( instead of Dynamic using devtmpfs only) for fxos8700
enable install timezone info
leave everything else buildroot default ( be sure busybox is init
program)
Kernel --ignore
Target Packages
Filesystem and flash utilities
mtd,jffs2 and ukbi/ubifs tools ## needed for mtdinfo: use defaults
squashfs ## not really needed?? add anyway
Graphics libraries and applications (graphic/text)
DirectFB (remove DirectFB touchscreen) #NO - use defaults
DirectFB (all examples -- df_andi for sure)
fbterm #next 6 fb items are NEW
fbv
fbdump
fbgrab
fb-test-app
SDL2
SDL2 directFB video driver # Don't forget this SILLY!!!
Hardware Handling:
evtest NEW-ADD-ON-NEXT-COMPILE-PLEASE PETER
i2c-tools ::NOTE: lm-sensors.org disappeared.
may have to build from scratch using
https://web.archive.org/web/20150905145034/
http://www.lm-sensors.org/
lshw
picocom
minicom
Libraries - Graphics (NEW)
tiff (NEW)
tiff utilities (NEW)
Text Editors
nano
Filesystem images
ext 2/3/4 root filesystem: ext3
compression method = no compression
enable tar the root filesystem + gzip compression
OR leave tar the root filesystem at no compression
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160502/8a1ce324/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
2016-05-02 15:57 [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16 Peter Thompson
@ 2016-05-02 16:14 ` Gustavo Zacarias
0 siblings, 0 replies; 7+ messages in thread
From: Gustavo Zacarias @ 2016-05-02 16:14 UTC (permalink / raw)
To: buildroot
On 02/05/16 12:57, Peter Thompson wrote:
> I am trying to install the SDL2 suite (SDL2, SDL2_gfx, SDL2_image,
> SDL2_ttf) using Buildroot-2016-02. SDL2 is incorporated into
> Buildroot-2016-02. SDL2_gfx and SDL2_image are relatively straight
> forward to add, but SDL2_ttf is being problematic. SDL2_ttf
> can't/won't use libpng16.
Hi.
SDL2_ttf doesn't use libpng at all, combined with the fact that you're
building the additional SDL2* packages manually is a recipe for trouble.
> My questions are:
>
> 1. Can I change Buildroot-2016-02 to use libpng12 instead of libpng16?
> I looked at libpng dependencies in Buildroot and they are HUGE! I see
> no easy way to change to libpng12.
Maybe, but expect other packages breaking because they require newer API
functionality or decided they didn't want to deal with old libpng.
> 2. Does an earlier version of buildroot use libpng12? Should I use
> that? I would miss having SDL2 available in buildroot - I had problems
> compiling that earlier.
Not really, i think you're wrong in trying to manually build everything.
> 3. Should I use buildroot to build a barebones rootfs without libpng and
> create what I need from there. Looking briefly at the dependencies, I
> am not sure that is possible.
No, again, make the additional SDL2* packages (sic) proper packages,
that's the way, i'm pretty sure it will just work(tm) at least for
SDL2_ttf since there's no mention of anything png-related in the source.
Regards.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
2016-05-13 20:44 ` Thomas Petazzoni
@ 2016-05-13 20:55 ` Peter Thompson
0 siblings, 0 replies; 7+ messages in thread
From: Peter Thompson @ 2016-05-13 20:55 UTC (permalink / raw)
To: buildroot
Hi Thomas,
You are correct of course. I am guilty of clicking the box and using
the results of Buildroot - without ever really looking under the hood....
and I got away with it in SDL1-2....:)
Peter
On Fri, May 13, 2016 at 2:44 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Fri, 13 May 2016 14:39:23 -0600, Peter Thompson wrote:
>
> > The answer is that I was unaware of the Buildroot autotools capability.
>
> Well, this is a bit hard to believe. Your work relies on the fact that
> Buildroot builds SDL2, right?
>
> And what is SDL2 using? The autotools. So surely, if you had taken a
> look at package/sdl2/sdl2.mk, which is the Buildroot description of how
> to build SDL2, you would have seen in a few minutes how an
> autotools-based package is handled.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160513/d7f9d8d9/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
2016-05-13 20:39 ` Peter Thompson
@ 2016-05-13 20:44 ` Thomas Petazzoni
2016-05-13 20:55 ` Peter Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-05-13 20:44 UTC (permalink / raw)
To: buildroot
Hello,
On Fri, 13 May 2016 14:39:23 -0600, Peter Thompson wrote:
> The answer is that I was unaware of the Buildroot autotools capability.
Well, this is a bit hard to believe. Your work relies on the fact that
Buildroot builds SDL2, right?
And what is SDL2 using? The autotools. So surely, if you had taken a
look at package/sdl2/sdl2.mk, which is the Buildroot description of how
to build SDL2, you would have seen in a few minutes how an
autotools-based package is handled.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
2016-05-12 21:45 ` Thomas Petazzoni
@ 2016-05-13 20:39 ` Peter Thompson
2016-05-13 20:44 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Peter Thompson @ 2016-05-13 20:39 UTC (permalink / raw)
To: buildroot
Hi Thomas,
The answer is that I was unaware of the Buildroot autotools capability.
Without really searching, I assumed if something was not already in
Buildroot, I had to add it manually. I have re-examined the Buildroot
users manual
https://*buildroot*.org/manual.html
and the Free Electrons notes
http://free-electrons.com/~thomas/buildroot/manual/html/ch11.html
and it seems like a much better way to do it and is something within my
capability.
Having said that, I learned a lot doing things manually even though it was
extremely frustrating and took me a very long time. I almost gave up a
couple of times. The help I got from you guys was super - and really
encouraging.
Thanks
Peter
On Thu, May 12, 2016 at 3:45 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Thu, 12 May 2016 13:05:56 -0600, Peter Thompson wrote:
>
> > Below are my personal notes on how I compiled the SDL2 suite - in the
> > hopes it is helpful to someone else. pmtstaging is a copy of the
> > buildroot sysroot which I wanted to keep pristine during this process.
> >
> > I will try to convert these notes into a buildroot patch and submit it -
> > making life much easier in the future.
>
> Quick question that might sound silly, but I believe worth asking: why
> are you taking this terribly complicated path to build SDL2_ttf
> manually, rather than creating a Buildroot package directly?
>
> The Buildroot autotools package infrastructure already handles most of
> the cross-compilation problems by itself. So all this terrible dance of
> CFLAGS and LDFLAGS, copying of sysroot and stuff that you're doing
> would have been completely unneeded if you had done a Buildroot package
> from the beginning.
>
> It seems to me like you've wasted a huge amount of time :-/
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160513/785cc619/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
2016-05-12 19:05 Peter Thompson
@ 2016-05-12 21:45 ` Thomas Petazzoni
2016-05-13 20:39 ` Peter Thompson
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2016-05-12 21:45 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 12 May 2016 13:05:56 -0600, Peter Thompson wrote:
> Below are my personal notes on how I compiled the SDL2 suite - in the
> hopes it is helpful to someone else. pmtstaging is a copy of the
> buildroot sysroot which I wanted to keep pristine during this process.
>
> I will try to convert these notes into a buildroot patch and submit it -
> making life much easier in the future.
Quick question that might sound silly, but I believe worth asking: why
are you taking this terribly complicated path to build SDL2_ttf
manually, rather than creating a Buildroot package directly?
The Buildroot autotools package infrastructure already handles most of
the cross-compilation problems by itself. So all this terrible dance of
CFLAGS and LDFLAGS, copying of sysroot and stuff that you're doing
would have been completely unneeded if you had done a Buildroot package
from the beginning.
It seems to me like you've wasted a huge amount of time :-/
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16
@ 2016-05-12 19:05 Peter Thompson
2016-05-12 21:45 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Peter Thompson @ 2016-05-12 19:05 UTC (permalink / raw)
To: buildroot
Thanks Gustavo, You are absolutely correct - and you saved me a huge
amount of mis-spent effort doing "wrong" things.
Below are my personal notes on how I compiled the SDL2 suite - in the
hopes it is helpful to someone else. pmtstaging is a copy of the
buildroot sysroot which I wanted to keep pristine during this process.
I will try to convert these notes into a buildroot patch and submit it -
making life much easier in the future.
Again - thanks for the help.
PS - I hope I am submitting this update properly....
===================================================
original message
On 02/05/16 12:57, Peter Thompson wrote:
>* I am trying to install the SDL2 suite (SDL2, SDL2_gfx, SDL2_image,
*>* SDL2_ttf) using Buildroot-2016-02. SDL2 is incorporated into
*>* Buildroot-2016-02. SDL2_gfx and SDL2_image are relatively straight
*>* forward to add, but SDL2_ttf is being problematic. SDL2_ttf
*>* can't/won't use libpng16.
*
Hi.
SDL2_ttf doesn't use libpng at all, combined with the fact that you're
building the additional SDL2* packages manually is a recipe for trouble.
>* My questions are:
*>>* 1. Can I change Buildroot-2016-02 to use libpng12 instead of libpng16?
*>* I looked at libpng dependencies in Buildroot and they are HUGE! I see
*>* no easy way to change to libpng12.
*
Maybe, but expect other packages breaking because they require newer API
functionality or decided they didn't want to deal with old libpng.
>* 2. Does an earlier version of buildroot use libpng12? Should I use
*>* that? I would miss having SDL2 available in buildroot - I had problems
*>* compiling that earlier.
*
Not really, i think you're wrong in trying to manually build everything.
>* 3. Should I use buildroot to build a barebones rootfs without libpng and
*>* create what I need from there. Looking briefly at the dependencies, I
*>* am not sure that is possible.
*
No, again, make the additional SDL2* packages (sic) proper packages,
that's the way, i'm pretty sure it will just work(tm) at least for
SDL2_ttf since there's no mention of anything png-related in the source.
Regards.
======================================================
Peter Thompson personal notes on building SDL2 suite.
Step 5 - Create pmtstaging
---------------------------
cp -a
/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY6/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot
/home/peter/igep2015/
mv /home/peter/igep2015/sysroot /home/peter/igep2015/pmtstaging
BUILD FROM SCRATCH BECAUSE BUILDROOT USES SDL1.2
######### also see readme-raspberrypi.txt in SDL sources ##############
Step -1 Download SDL2 suite
--------------------------
SDL2_gfx-1.0.1.tar.gz
SDL2_image-2.0.0.tar.gz
SDL2_ttf-2.0.14.tar.gz
tar -xvzf SDL2_gfx-1.0.1.tar.gz
tar -xvzf SDL2_image-2.0.0.tar.gz
tar -xvzf SDL2_ttf-2.0.14.tar.gz
Step 0 - Set Ubuntu environment variables
-----------------------------------------
echo $PATH
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
# Buildroot requires glibc (Error IPV6 required)
- will not work against uclibc
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
export CC=arm-linux-gcc
export CFLAGS="-v -Wl,--verbose" ###optional for debugging
======================================================================
######################### SDL2_gfx ############################
Step 1 - Configure SDLgfx
--------------------------
cd ~/igep2015/92SDLgfx/SDL2_gfx-1.0.1
read README file
./configure --help # look in config.log to debug SDL configuration
make clean #
make distclean # if redoing configuration
--environment variables
export LDFLAGS="-L/home/peter/igep2015/pmtstaging/lib
-L/home/peter/igep2015/pmtstaging/usr/lib"
export CPPFLAGS=-I/home/peter/igep2015/pmtstaging/usr/include
export CC="arm-linux-gcc --sysroot=/home/peter/igep2015/pmtstaging"
./configure --prefix=/usr --host=arm-linux --disable-mmx
--with-sysroot=/home/peter/igep2015/pmtstaging
Step 2 make & install in pmtstaging
-----------------------------------
make
make DESTDIR=/home/peter/igep2015/pmtstaging/ install
## to see what's being installed also do ###
make DESTDIR=/home/peter/igep2015/93SDLgfx/staging install
Step 3 - transfer libs to igpev2 sysroot (pmtroot)
---------------------------------------------------
....copy the library libSDL2_gfx to pmtroot
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_gfx-1.0.*
/home/peter/igep2015/pmtroot/usr/lib/
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_gfx.so
/home/peter/igep2015/pmtroot/usr/lib/
# if not still debugging, strip symbols
arm-linux-strip
/home/peter/igep2015/pmtroot/usr/lib/libSDL2_gfx-1.0.so.0.0.1
==============================================================================
######################## SDL2_image
####################################
Step 1 - Configure
------------------
cd ~/igep2015/93SDLimage/SDL2_image-2.0.0
read README.txt file
./configure --help # look in config.log to debug SDL configuration
make clean
make distclean # if redoing configuration
-- environment variables (same as above)
export LDFLAGS="-L/home/peter/igep2015/pmtstaging/lib
-L/home/peter/igep2015/pmtstaging/usr/lib"
export CPPFLAGS=-I/home/peter/igep2015/pmtstaging/usr/include
export CC="arm-linux-gcc --sysroot=/home/peter/igep2015/pmtstaging"
./configure --prefix=/usr --host=arm-linux --disable-gif --disable-jpg
--disable-jpg-shared --disable-lbm --disable-pcx --disable-pnm
--disable-tga --disable-xcf --disable-xpm --disable-xv --disable-webp
--disable-webp-shared
(**NOTE --with-sysroot= not supported)
Step 2 make & install in pmtstaging
-----------------------------------
make
make DESTDIR=/home/peter/igep2015/pmtstaging/ install
## to see what's being installed also do ###
make DESTDIR=/home/peter/igep2015/94SDLimage/staging install
Step 3 - transfer libs to igpev2 sysroot (pmtroot)
--------------------------------------------------
....copy the library libSDL2_image to pmtroot
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_image-2.0.*
/home/peter/igep2015/pmtroot/usr/lib/
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_image.so
/home/peter/igep2015/pmtroot/usr/lib/
# if not still debugging, strip symbols
arm-linux-strip
/home/peter/igep2015/pmtroot/usr/lib/libSDL2_image-2.0.so.0.0.0
Step 4 Cross-Compile into pmtroot & test
----------------------------------------
cd ~/igep2015/pmtroot/root/helloworld/hellosensor
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
export PKG_CONFIG_PATH=/home/peter/igep2015/pmtstaging/usr/lib/pkgconfig/
rm test3
arm-linux-gcc -o test3 ~/Documents/helloworld/hellosensor/test3.c
--sysroot=/home/peter/igep2015/pmtstaging/ $(pkg-config --libs --cflags
sdl2) $(pkg-config --libs --cflags SDL2_image)
./test3
IT WORKS!!!
==============================================================================
######################## SDL2_ttf ####################################
Information
------------
arm-linux-gcc -print-search-dirs ==>
arm-linux-gcc -print-sysroot
-Wl,--verbose pass this flag to linker as in
arm-linux-gcc -Wl,--verbose hello.c
see www.stackoverflow.com >> user >> Peter Thompson (3 questions)
http://stackoverflow.com/questions/36682302/cant-access-buildroot-staging-libraries-via-configure-when-cross-compiling-i
http://stackoverflow.com/questions/36682427/cannot-cross-compile-sdl2-ttf-onto-arm-linux
http://stackoverflow.com/questions/33343266/cross-compile-sdl2-with-directfb-and-add-to-a-buildroot-root-filesystem
Step 1 - Configure
------------------
cd ~/igep2015/94SDLttf/SDL2_ttf-2.0.14/
-- environment variables (same as above)
export CPPFLAGS="-I/home/peter/igep2015/pmtstaging/usr/include"
export LDFLAGS="-L/home/peter/igep2015/pmtstaging/lib
-L/home/peter/igep2015/pmtstaging/usr/lib"
export CC="arm-linux-gcc --sysroot=/home/peter/igep2015/pmtstaging"
./configure --host=arm-linux --prefix=/usr
--with-freetype-prefix=/home/peter/igep2015/pmtstaging/usr
Step 2 - make & install in pmtstaging
----------------------------------------
make
make DESTDIR=/home/peter/igep2015/pmtstaging/ install
## to see what's being installed also do ###
make DESTDIR=/home/peter/igep2015/95SDLttf/staging install
Step 3 - transfer libs to igpev2 sysroot (pmtroot)
---------------------------------------------------
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_ttf-2.0.so*
/home/peter/igep2015/pmtroot/usr/lib/
sudo cp -a ~/igep2015/pmtstaging/usr/lib/libSDL2_ttf.so
/home/peter/igep2015/pmtroot/usr/lib/
# if not still debugging, strip symbols
arm-linux-strip
/home/peter/igep2015/pmtroot/usr/lib/libSDL2_ttf-2.0.so.0.14.0
Step 4 Cross-Compile into pmtroot & test
----------------------------------------
cd ~/igep2015/pmtroot/root/viewsensor/
export PATH=$PATH:/usr/local/xtools/arm-unknown-linux-gnueabi/bin/
export PKG_CONFIG_PATH=/home/peter/igep2015/pmtstaging/usr/lib/pkgconfig/
rm viewtest
arm-linux-gcc -o viewtest ~/Documents/oz2/sdl2test/viewsensor/viewtest.c
SDL2init.c --sysroot=/home/peter/igep2015/pmtstaging/ $(pkg-config --libs
--cflags sdl2) $(pkg-config --libs --cflags SDL2_image) $(pkg-config
--libs --cflags SDL2_ttf)
./viewtest
IT WORKS (be sure to copy fonts into pmtroot)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160512/21339a76/attachment.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-05-13 20:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02 15:57 [Buildroot] SDL2_ttf requires libpng12 but Buildroot installs libpng16 Peter Thompson
2016-05-02 16:14 ` Gustavo Zacarias
2016-05-12 19:05 Peter Thompson
2016-05-12 21:45 ` Thomas Petazzoni
2016-05-13 20:39 ` Peter Thompson
2016-05-13 20:44 ` Thomas Petazzoni
2016-05-13 20:55 ` Peter Thompson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.