Re: [FreeJ] libccvt.a

dyne.org open discussions
Author: MrGoil
Date:  
To: FreeJ mailinglist
Subject: Re: [FreeJ] libccvt.a
Who ate my attachment???


From 0df104c160b54c3d5279a573b36e4db5aa961b0a Mon Sep 17 00:00:00 2001
From: chris <chris@???>
Date: Fri, 19 Dec 2008 18:43:17 +0100
Subject: [PATCH] ccvt compile fixes

---
 lib/ccvt/Makefile.am    |    9 +++++++--
 lib/ccvt/ccvt_mmx.S     |    4 ++--
 lib/ccvt/ccvt_rgb2yuv.S |    4 ++--
 src/Makefile.am         |   18 +++++++++---------
 4 files changed, 20 insertions(+), 15 deletions(-)


diff --git a/lib/ccvt/Makefile.am b/lib/ccvt/Makefile.am
index 5bb0922..abfdaed 100644
--- a/lib/ccvt/Makefile.am
+++ b/lib/ccvt/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = -I$(top_srcdir)
+INCLUDES = -I$(top_builddir) -I$(top_srcdir)/lib -I$(top_srcdir)/src/include

AUTOMAKE_OPTIONS = foreign

@@ -8,4 +8,9 @@ libccvt_a_SOURCES = \
         ccvt_c2.c \
         ccvt_mmx.S \
         ccvt_rgb2yuv.S \
-        ccvt_misc.c
+        ccvt_misc.c
+
+%.o: %.S
+    @echo $< \-\> $@
+    $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
+
diff --git a/lib/ccvt/ccvt_mmx.S b/lib/ccvt/ccvt_mmx.S
index d8a658c..2a3e712 100644
--- a/lib/ccvt/ccvt_mmx.S
+++ b/lib/ccvt/ccvt_mmx.S
@@ -19,7 +19,7 @@
     reached at nemosoft@???.
 */


-#include "../../config.h"
+#include <config.h>
#if defined HAVE_MMX && !defined HAVE_64BIT

/* The ccvt_* functions always have 4 paramaters:
@@ -30,7 +30,7 @@
*/

#define __ASSEMBLY__
-#include "../../src/include/asm-linkage.h"
+#include <asm-linkage.h>

#define Width 8(%ebp)
#define Height 12(%ebp)
diff --git a/lib/ccvt/ccvt_rgb2yuv.S b/lib/ccvt/ccvt_rgb2yuv.S
index 2af0a19..7be58fc 100644
--- a/lib/ccvt/ccvt_rgb2yuv.S
+++ b/lib/ccvt/ccvt_rgb2yuv.S
@@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.

*/
-#include "../../config.h"
+#include <config.h>
#if defined HAVE_MMX && !defined HAVE_64BIT

/* The ccvt_* functions always start with width and height, so these
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA.
*/

#define __ASSEMBLY__
-#include "../../src/include/asm-linkage.h"
+#include <asm-linkage.h>

#define Width 8(%ebp)
#define Height 12(%ebp)
diff --git a/src/Makefile.am b/src/Makefile.am
index 40b0811..a5bc699 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -104,15 +104,15 @@ freej_SOURCES = \
noinst_LIBRARIES = libfreej.a
libfreej_a_SOURCES = $(freej_SOURCES)

-freej_LDADD = $(top_srcdir)/lib/ccvt/libccvt.a \
-              $(top_srcdir)/lib/sdl_image/libsdl_image.a \
-              $(top_srcdir)/lib/sdl_gfx/libsdl_gfx.a \
-          $(top_srcdir)/lib/sdl_ttf/libsdl_ttf.a \
-          $(top_srcdir)/lib/flash/libflash.a \
-          $(top_srcdir)/lib/goom/libgoom2.a \
-              $(top_srcdir)/lib/shout/libshout.a \
-              $(top_srcdir)/lib/lo/liblo.a \
-              $(top_srcdir)/lib/cwiid/libwiimote.a \
+freej_LDADD = $(top_builddir)/lib/ccvt/libccvt.a \
+              $(top_builddir)/lib/sdl_image/libsdl_image.a \
+              $(top_builddir)/lib/sdl_gfx/libsdl_gfx.a \
+          $(top_builddir)/lib/sdl_ttf/libsdl_ttf.a \
+          $(top_builddir)/lib/flash/libflash.a \
+          $(top_builddir)/lib/goom/libgoom2.a \
+              $(top_builddir)/lib/shout/libshout.a \
+              $(top_builddir)/lib/lo/liblo.a \
+              $(top_builddir)/lib/cwiid/libwiimote.a \
               -ldl -lpthread -lm -lslang -lpng -ljpeg -lrt -lGL \
              @X11_LIBS@ \
          @JSCRIPT_LIBS@ \
-- 
1.5.4.5




MrGoil schrieb:
> Hiho!
>
> U just remind me ... I fixed the ccvt stuff some time ago because it
> refused to compile when using a distinct target directory for the binaries.
>
> The CFLAGS don't have any effects unless we define the cooking receipt for
> building shared from .S
>
> This patch works for me compiling ppc and ia32 from the same working dir.
> Maybe this fixes 64bit, too.
>
> MrGoil
>
>
>
> alejo d schrieb:
>> hia,
>> im getting this error when i run make, using git sources from today
>> under gentoo.. any advice appreciated.
>> tx,
>> /a
>>
>> /bin/sh ../libtool --tag=CXX --mode=link g++ -I/usr/include/SDL
>> -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/freetype2
>> -I/usr/include/ffmpeg/libavutil/ -I/usr/include/ffmpeg/libavformat/
>> -I/usr/include/ffmpeg/libavcodec/ -I/usr/include/ffmpeg/libswscale
>> -I/usr/include/ffmpeg/ -freg-struct-return -DPREFIX="\"/usr/local\""
>> -DDATADIR="\"/usr/local/share\"" -pipe -D_REENTRANT
>> -freg-struct-return -fPIC -O2 -mfpmath=sse -mtune=core2 -O2 -o
>> libfreej.la -rpath /usr/local/lib -version-info 0:0:0 context.lo
>> layer.lo blitter.lo iterator.lo linklist.lo jsync.lo console.lo
>> cpu_accel.lo plugin.lo plugger.lo frei0r.lo freeframe.lo filter.lo
>> parameter.lo jutils.lo fastmemcpy.lo ringbuffer.lo convertvid.lo
>> v4l_layer.lo tvfreq.lo unicap_layer.lo video_layer.lo image_layer.lo
>> text_layer.lo gen_f0r_layer.lo geo_layer.lo flash_layer.lo
>> scroll_layer.lo xhacks_layer.lo goom_layer.lo impl_layers.lo screen.lo
>> sdl_screen.lo sdlgl_screen.lo gl_screen.lo controller.lo kbd_ctrl.lo
>> mouse_ctrl.lo vimo_ctrl.lo joy_ctrl.lo midi_ctrl.lo trigger_ctrl.lo
>> osc_ctrl.lo wiimote_ctrl.lo audio_jack.lo audio_collector.lo
>> video_encoder.lo ffmpeg_encoder.lo theorautils.lo oggtheora_encoder.lo
>> impl_video_encoders.lo xgrab_layer.lo context_js.lo layer_js.lo
>> filter_js.lo jsparser.lo callbacks_js.lo video_encoder_js.lo
>> v4l_layer_js.lo unicap_layer_js.lo video_layer_js.lo image_layer_js.lo
>> text_layer_js.lo geo_layer_js.lo flash_layer_js.lo scroll_layer_js.lo
>> goom_layer_js.lo audio_collector_js.lo ../lib/ccvt/libccvt.a
>> ../lib/sdl_image/libsdl_image.a ../lib/sdl_gfx/libsdl_gfx.a
>> ../lib/sdl_ttf/libsdl_ttf.a ../lib/flash/libflash.a
>> ../lib/shout/libshout.a ../lib/lo/liblo.a
>> ../lib/javascript/obj/libjs.a -ldl -lpthread -lm -lslang -lpng -ljpeg
>> -lrt -lX11 -lvorbisenc -lvorbis -lm -logg -logg -lvorbis -lvorbisenc
>> -ltheora -lSDL -lpthread ../lib/flash/libflash.a -lfreetype -lz
>> -lasound -ljack -lpthread -lrt -lfftw3 -lm -lavcodec -lavformat
>> -lavutil -lswscale -lswscale -lX11 -lbluetooth
>> ../lib/cwiid/libwiimote.a
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/ccvt/libccvt.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/sdl_image/libsdl_image.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/sdl_gfx/libsdl_gfx.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/sdl_ttf/libsdl_ttf.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/shout/libshout.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/lo/liblo.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/javascript/obj/libjs.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/flash/libflash.a is not portable!
>>
>> *** Warning: Linking the shared library libfreej.la against the
>> *** static library ../lib/cwiid/libwiimote.a is not portable!
>> libtool: link: g++ -shared -nostdlib
>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/crti.o
>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/crtbeginS.o .libs/context.o
>> .libs/layer.o .libs/blitter.o .libs/iterator.o .libs/linklist.o
>> .libs/jsync.o .libs/console.o .libs/cpu_accel.o .libs/plugin.o
>> .libs/plugger.o .libs/frei0r.o .libs/freeframe.o .libs/filter.o
>> .libs/parameter.o .libs/jutils.o .libs/fastmemcpy.o .libs/ringbuffer.o
>> .libs/convertvid.o .libs/v4l_layer.o .libs/tvfreq.o
>> .libs/unicap_layer.o .libs/video_layer.o .libs/image_layer.o
>> .libs/text_layer.o .libs/gen_f0r_layer.o .libs/geo_layer.o
>> .libs/flash_layer.o .libs/scroll_layer.o .libs/xhacks_layer.o
>> .libs/goom_layer.o .libs/impl_layers.o .libs/screen.o
>> .libs/sdl_screen.o .libs/sdlgl_screen.o .libs/gl_screen.o
>> .libs/controller.o .libs/kbd_ctrl.o .libs/mouse_ctrl.o
>> .libs/vimo_ctrl.o .libs/joy_ctrl.o .libs/midi_ctrl.o
>> .libs/trigger_ctrl.o .libs/osc_ctrl.o .libs/wiimote_ctrl.o
>> .libs/audio_jack.o .libs/audio_collector.o .libs/video_encoder.o
>> .libs/ffmpeg_encoder.o .libs/theorautils.o .libs/oggtheora_encoder.o
>> .libs/impl_video_encoders.o .libs/xgrab_layer.o .libs/context_js.o
>> .libs/layer_js.o .libs/filter_js.o .libs/jsparser.o
>> .libs/callbacks_js.o .libs/video_encoder_js.o .libs/v4l_layer_js.o
>> .libs/unicap_layer_js.o .libs/video_layer_js.o .libs/image_layer_js.o
>> .libs/text_layer_js.o .libs/geo_layer_js.o .libs/flash_layer_js.o
>> .libs/scroll_layer_js.o .libs/goom_layer_js.o
>> .libs/audio_collector_js.o ../lib/ccvt/libccvt.a
>> ../lib/sdl_image/libsdl_image.a ../lib/sdl_gfx/libsdl_gfx.a
>> ../lib/sdl_ttf/libsdl_ttf.a ../lib/shout/libshout.a ../lib/lo/liblo.a
>> ../lib/javascript/obj/libjs.a -lslang /usr/lib64/libpng12.so
>> /usr/lib64/libjpeg.so -L/usr/lib64 /usr/lib64/libvorbisenc.so
>> /usr/lib64/libvorbis.so /usr/lib64/libtheora.so /usr/lib64/libogg.so
>> /usr/lib64/libSDL.so /usr/lib64/libaa.so -lncurses /usr/lib64/libts.so
>> ../lib/flash/libflash.a /usr/lib64/libfreetype.so -lz
>> /usr/lib64/libasound.so /usr/lib64/libjack.so
>> /usr/lib64/libsamplerate.so -lpthread -lrt /usr/lib64/libfftw3.so
>> -lavcodec -lavformat -lavutil -lswscale /usr/lib64/libX11.so
>> /usr/lib64/libxcb-xlib.so /usr/lib64/libxcb.so /usr/lib64/libXau.so
>> /usr/lib64/libXdmcp.so -ldl /usr/lib64/libbluetooth.so
>> ../lib/cwiid/libwiimote.a -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2
>> -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64
>> -L/lib/../lib64 -L/usr/lib/../lib64
>> -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/lib
>> -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../.. -lstdc++ -lm -lc
>> -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/crtendS.o
>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../lib64/crtn.o
>> -mfpmath=sse -mtune=core2 -Wl,-soname -Wl,libfreej.so.0 -o
>> .libs/libfreej.so.0.0.0
>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld:
>> ../lib/ccvt/libccvt.a(ccvt_c2.o): relocation R_X86_64_32 against `a
>> local symbol' can not be used when making a shared object; recompile
>> with -fPIC
>> ../lib/ccvt/libccvt.a: could not read symbols: Bad value
>> collect2: ld returned 1 exit status
>> make[3]: *** [libfreej.la] Error 1
>> make[3]: Leaving directory `/home/dspstv/video/freej/src'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/dspstv/video/freej/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/dspstv/video/freej'
>> make: *** [all] Error 2
>> _______________________________________________
>> Free the veejay - http://freej.dyne.org
>> open wiki at http://lab.dyne.org/Freej
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Free the veejay - http://freej.dyne.org
>> open wiki at http://lab.dyne.org/Freej