* [gentoo-embedded] SDL library usage
@ 2006-06-22 8:01 Jakub Ladman
2006-06-22 8:45 ` Ned Ludd
2006-06-24 7:28 ` Mike Frysinger
0 siblings, 2 replies; 5+ messages in thread
From: Jakub Ladman @ 2006-06-22 8:01 UTC (permalink / raw
To: gentoo-embedded
Greetings
My friend has recomended me SDL library for graphical output of my SuperH4
embedded system with framebuffer device.
After succesfull cross emerge the media-libs/libsdl library, i am trying to
crosscompile any demo, but everythings fails.
Do you have tip to a crosscompilable test software for graphics via sdl?
Here is output of running Makefile, where i have manually changed gcc compiler
to sh4-pc-linux-uclibc.
ladmanj@trotl ~/src/fire_sh $ make
sh4-pc-linux-uclibc-gcc -DPACKAGE=\"fire\" -DVERSION=\"1.0\" -I. -I. -g -O2 -I/usr/include/SDL -D_REENTRANT -c
fire.c
sh4-pc-linux-uclibc-gcc -g -O2 -I/usr/include/SDL -D_REENTRANT -o fire
fire.o -lSDL -lpthread
/usr/lib/gcc/sh4-pc-linux-uclibc/3.4.6/../../../../sh4-pc-linux-uclibc/bin/ld:
cannot find -lSDL
collect2: ld returned 1 exit status
make: *** [fire] Error 1
ladmanj@trotl ~/src/fire_sh $
It seems, like the cross compiler does not know the native library.
Thanks for your help
Best regards
Jakub Ladman
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-embedded] SDL library usage
2006-06-22 8:01 [gentoo-embedded] SDL library usage Jakub Ladman
@ 2006-06-22 8:45 ` Ned Ludd
2006-06-22 11:24 ` Jakub Ladman
2006-06-24 7:28 ` Mike Frysinger
1 sibling, 1 reply; 5+ messages in thread
From: Ned Ludd @ 2006-06-22 8:45 UTC (permalink / raw
To: gentoo-embedded
On Thu, 2006-06-22 at 10:01 +0200, Jakub Ladman wrote:
> Greetings
>
> My friend has recomended me SDL library for graphical output of my SuperH4
> embedded system with framebuffer device.
>
> After succesfull cross emerge the media-libs/libsdl library, i am trying to
> crosscompile any demo, but everythings fails.
>
> Do you have tip to a crosscompilable test software for graphics via sdl?
>
> Here is output of running Makefile, where i have manually changed gcc compiler
> to sh4-pc-linux-uclibc.
>
> ladmanj@trotl ~/src/fire_sh $ make
> sh4-pc-linux-uclibc-gcc -DPACKAGE=\"fire\" -DVERSION=\"1.0\" -I. -I. -g -O2 -I/usr/include/SDL -D_REENTRANT -c
> fire.c
> sh4-pc-linux-uclibc-gcc -g -O2 -I/usr/include/SDL -D_REENTRANT -o fire
> fire.o -lSDL -lpthread
> /usr/lib/gcc/sh4-pc-linux-uclibc/3.4.6/../../../../sh4-pc-linux-uclibc/bin/ld:
> cannot find -lSDL
> collect2: ld returned 1 exit status
> make: *** [fire] Error 1
> ladmanj@trotl ~/src/fire_sh $
>
>
> It seems, like the cross compiler does not know the native library.
Try including and linking with the sdl in your ROOT environment vs
your / env. You know the -L/path -I/path flags..
--
Ned Ludd <solar@gentoo.org>
Gentoo Linux
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-embedded] SDL library usage
2006-06-22 8:45 ` Ned Ludd
@ 2006-06-22 11:24 ` Jakub Ladman
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Ladman @ 2006-06-22 11:24 UTC (permalink / raw
To: gentoo-embedded
I do not know if i correctly follow your hint, but have still no succes.
Here are my environment.
Thank you.
ladmanj@trotl ~/src/fire_sh $ cat mmake
#!/bin/bash
ARCH=sh4
#ACCEPT_KEYWORDS="-x86 -~x86 sh ~sh"
ROOT="/mnt/mt3006i" #ROOT="/home/ladmanj/work_projects/sh4prj"
#ROOT="/var/sh4prj"
CFLAGS="-Os -pipe -fPIC"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-L${ROOT}/lib -L${ROOT}/usr/lib"
LD="sh4-pc-linux-uclibc-ld"
CBUILD=i686-pc-linux-gnu
CHOST=sh4-pc-linux-uclibc
CTARGET=sh4-pc-linux-uclibc
CC=sh4-pc-linux-uclibc-gcc
CXX=sh4-pc-linux-uclibc-g++
PKGDIR=/usr/portage/packages/sh4
#USE="-* -X -kde -gnome -glibc uclibc make-symlinks dhcp noaudio fbcon
nojoystick"
export ARCH ACCEPT_KEYWORDS CFLAGS CXXFLAGS LDFLAGS ROOT CBUILD CHOST CTARGET
CC CXX PKGDIR USE LD
#emerge -b $*
make
ladmanj@trotl ~/src/fire_sh $
ladmanj@trotl ~/src/fire_sh $ cat Makefile
# Generated automatically from Makefile.in by configure.
# Makefile.in generated automatically by automake 1.4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/fire
pkglibdir = $(libdir)/fire
pkgincludedir = $(includedir)/fire
top_builddir = .
ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOMAKE = automake
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
CC = sh4-pc-linux-uclibc-gcc
MAKEINFO = makeinfo
PACKAGE = fire
SDL_CFLAGS = -I$(ROOT)/usr/include/SDL -D_REENTRANT
SDL_CONFIG = $(ROOT)/usr/bin/sdl-config
SDL_LIBS = -l$(ROOT)/usr/include/SDL/SDL.h -lpthread
VERSION = 1.0
bin_PROGRAMS = fire
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
PROGRAMS = $(bin_PROGRAMS)
DEFS = -DPACKAGE=\"fire\" -DVERSION=\"1.0\" -I. -I$(srcdir)
CPPFLAGS =
LDFLAGS =
LIBS = -l$(ROOT)/usr/include/SDL/SDL.h -lpthread
fire_SOURCES = fire.c
fire_OBJECTS = fire.o
fire_LDADD = $(LDADD)
fire_DEPENDENCIES =
fire_LDFLAGS =
CFLAGS = -g -O2 -I$(ROOT)/usr/include/SDL -D_REENTRANT
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
$(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = README Makefile.am Makefile.in acinclude.m4 aclocal.m4 \
configure configure.in install-sh missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
SOURCES = fire.c
OBJECTS = fire.o
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4)
$(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|
sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|
sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|
sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
fire: $(fire_OBJECTS) $(fire_DEPENDENCIES)
@rm -f fire
$(LINK) $(fire_LDFLAGS) $(fire_OBJECTS) $(fire_LDADD) $(LIBS)
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o
$$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \
mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
distclean-generic clean-am
distclean: distclean-am
-rm -f config.status
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
-rm -f config.status
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
ladmanj@trotl ~/src/fire_sh $
Dne čtvrtek 22 červen 2006 10:45 Ned Ludd napsal(a):
> On Thu, 2006-06-22 at 10:01 +0200, Jakub Ladman wrote:
> > Greetings
> >
> > My friend has recomended me SDL library for graphical output of my
> > SuperH4 embedded system with framebuffer device.
> >
> > After succesfull cross emerge the media-libs/libsdl library, i am trying
> > to crosscompile any demo, but everythings fails.
> >
> > Do you have tip to a crosscompilable test software for graphics via sdl?
> >
> > Here is output of running Makefile, where i have manually changed gcc
> > compiler to sh4-pc-linux-uclibc.
> >
> > ladmanj@trotl ~/src/fire_sh $ make
> > sh4-pc-linux-uclibc-gcc -DPACKAGE=\"fire\" -DVERSION=\"1.0\" -I. -I.
> > -g -O2 -I/usr/include/SDL -D_REENTRANT -c fire.c
> > sh4-pc-linux-uclibc-gcc -g -O2 -I/usr/include/SDL -D_REENTRANT -o fire
> > fire.o -lSDL -lpthread
> > /usr/lib/gcc/sh4-pc-linux-uclibc/3.4.6/../../../../sh4-pc-linux-uclibc/bi
> >n/ld: cannot find -lSDL
> > collect2: ld returned 1 exit status
> > make: *** [fire] Error 1
> > ladmanj@trotl ~/src/fire_sh $
> >
> >
> > It seems, like the cross compiler does not know the native library.
>
> Try including and linking with the sdl in your ROOT environment vs
> your / env. You know the -L/path -I/path flags..
>
> --
> Ned Ludd <solar@gentoo.org>
> Gentoo Linux
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-embedded] SDL library usage
2006-06-22 8:01 [gentoo-embedded] SDL library usage Jakub Ladman
2006-06-22 8:45 ` Ned Ludd
@ 2006-06-24 7:28 ` Mike Frysinger
2006-06-26 8:34 ` Jakub Ladman
1 sibling, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2006-06-24 7:28 UTC (permalink / raw
To: gentoo-embedded; +Cc: Jakub Ladman
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
On Thursday 22 June 2006 04:01, Jakub Ladman wrote:
> After succesfull cross emerge the media-libs/libsdl library, i am trying to
> crosscompile any demo, but everythings fails.
solar told you how already ... the -I paths in your output are clearly wrong
and you need to add custom -L paths to your LDFLAGS so the build can find the
libsdl you cross compiled
-mike
[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-embedded] SDL library usage
2006-06-24 7:28 ` Mike Frysinger
@ 2006-06-26 8:34 ` Jakub Ladman
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Ladman @ 2006-06-26 8:34 UTC (permalink / raw
To: gentoo-embedded
Dne sobota 24 červen 2006 09:28 Mike Frysinger napsal(a):
> On Thursday 22 June 2006 04:01, Jakub Ladman wrote:
> > After succesfull cross emerge the media-libs/libsdl library, i am trying
> > to crosscompile any demo, but everythings fails.
>
> solar told you how already ... the -I paths in your output are clearly
> wrong and you need to add custom -L paths to your LDFLAGS so the build can
> find the libsdl you cross compiled
> -mike
I can not found the right path.
I have found both header SDL.h and binary libSDL.so files with locate in the
target directory, but if i have copied the paths to -l and -L parameters,
linker still tells me, that it can not be found.
Sorry i am a newbie and have not enough knowledge for a effective
troubleshooting.
Thank you
Jakub Ladman
--
gentoo-embedded@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-06-26 8:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-22 8:01 [gentoo-embedded] SDL library usage Jakub Ladman
2006-06-22 8:45 ` Ned Ludd
2006-06-22 11:24 ` Jakub Ladman
2006-06-24 7:28 ` Mike Frysinger
2006-06-26 8:34 ` Jakub Ladman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox