Hello all,
I saw several people with presumably the same compiling problems here recently
-- --
So I want to report my solution.
I were using my own Cin Version with my bezier patch, based on -r909. Now, after
upgrading (dist-upgrade) my System to the newest 64Studio + Debian Etch - level,
I had to re-enable my compiling environment, which was partially tricky this
time,
because you have to be careful to get not too much of Debian/unstable in, as
there
seems to be some ongoing transition which involves upgrading the libc6 --
obviousely
not what you want.
Next, I used Vale's latest AMD64 package and SVN -r978 to find out the newest
modifications
to the debian buildfiles (debian/control and debian/rules) and merge them with
my own
modifications.
After "dpkg-checkbuilddeps" ran ok, i.e. all build dependencies were met, I
could
rebuild my own package based on -r909 without problems.
But doing the same based on -r1007 (but with the debian buildfiles mentioned
above) failed.
The problem is always trying to link PIC (position independent code) with
non-pic code.
Now, the obvious solution would be to compile without PIC altogether (it's of
no use, because
we don't want to share lib code in memory between different programms and,
morover, PIC is
said to have a small performance penalty). But since I am compiling Cin-CV on
Debian-AMD64,
I found this almost immpossible, because far too much libs in the system seem
to be built
as PIC. Anyway, if you configure --without-pic, the compile fails very early.
Now, the problem comes with the included ffmpeg. It has a configure switch
which overrides
the -fPIC. I don't know why this worked earlier, because, according to SVN,
this switch was
always there. Anyhow, if you change this, you can configure --with-pic and
build CFLAGS+=-fPIC
and the compile goes through.
========================================================================
diff --git a/quicktime/ffmpeg/libavcodec/i386/Makefile.am
b/quicktime/ffmpeg/libavcodec/i386/Makefile.am
index 4bc5fe2..7d5b6c3 100644
--- a/quicktime/ffmpeg/libavcodec/i386/Makefile.am
+++ b/quicktime/ffmpeg/libavcodec/i386/Makefile.am
@@ -12,7 +12,7 @@ AM_CFLAGS = \
$(LARGEFILE_CFLAGS) \
$(CPU_CFLAGS) \
-DHAVE_MMX $(SSE_FLAGS) \
- -O3 -prefer-non-pic \
+ -O3 \
-D_GNU_SOURCE -DHAVE_AV_CONFIG_H -I$(srcdir)/../.. -I../..
libavcodeci386_la_SOURCES = \
I attach my current (private) version of debian/rules, maybe it's helpful.
I added a own section for AMD64 and an debug build/release build switch
Cheers,
Hermann Vosseler
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.
package=hvirtual
export DH_COMPAT=4
CONFFLAGS=--with-buildinfo=svn/recompile
# debug or release build?
#DEB_BUILD_OPTIONS+= --nostrip
#DEB_BUILD_OPTIONS+= --debug
#DEB_BUILD_OPTIONS+= --opengl
#since we are building from .svn
+export DH_ALWAYS_EXCLUDE=.svn:.git
ARCH=$(DEB_HOST_ARCH)
ifeq ($(ARCH),i386)
CFLAGS=-ffast-math -minline-all-stringops -fprefetch-loop-arrays
-funroll-loops
# CFLAGS=-ffast-math -g -mmmx -march=pentium-mmx
CXXFLAGS=$(CFLAGS) -fno-check-new
CONFFLAGS+= --without-pic
endif
ifeq ($(ARCH),i686)
CFLAGS=-ffast-math -mmmx -march=pentium4 -msse -msse2
-minline-all-stringops -fprefetch-loop-arrays -funroll-loops
# CFLAGS=-ffast-math -g -mmmx -march=pentium-mmx
CXXFLAGS=$(CFLAGS) -fno-check-new
CONFFLAGS+=--enable-mmx --enable-x86 --without-pic
endif
ifeq ($(ARCH),amd64)
CFLAGS=-ffast-math -msse3 -march=athlon64 -funroll-loops
-minline-all-stringops -fprefetch-loop-arrays -fPIC
CXXFLAGS=$(CFLAGS) -fno-check-new
CONFFLAGS+=--enable-sse3 --with-pic
endif
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
# CFLAGS += -ggdb3
CFLAGS += -O1
else
CFLAGS += -O3
endif
ifneq (,$(findstring opengl,$(DEB_BUILD_OPTIONS)))
CONFFLAGS += --enable-opengl
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
# "binary not stripped!"
endif
ifneq (, $(findstring smp2,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS=-j2
endif
config.status: configure
$(checkdir)
@if [ -z "$(CFLAGS)" ] ; then CFLAGS="$(CFLAGS)" ; fi ;
@if [ -z "$(CXXFLAGS)" ] ; then CXXFLAGS="$(CXXFLAGS)" ; fi ;
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
./configure --prefix=/usr $(CONFFLAGS)
build: build-stamp
build-stamp: config.status
$(checkdir)
$(MAKE) $(MAKEFLAGS)
docbook-to-man debian/cinelerra.sgml > debian/cinelerra.1
docbook-to-man debian/mplexhi.sgml > debian/mplexhi.1
docbook-to-man debian/mplexlo.sgml > debian/mplexlo.1
touch build-stamp
clean:
$(checkdir)
-$(MAKE) -i distclean
dh_clean -a
-rm -f debian/cinelerra.1
-rm -f debian/mplexhi.1
-rm -f debian/mplexlo.1
-rm -f build-stamp
binary-indep: checkroot build-stamp
binary-arch: checkroot build-stamp
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
chmod -x debian/tmp/usr/lib/cinelerra/*
chmod +x debian/tmp/usr/lib/cinelerra/fonts
chmod -x debian/tmp/usr/lib/cinelerra/fonts/*
dh_install --sourcedir=debian/tmp --autodest
dh_installdocs -XCVS
dh_installchangelogs -a
dh_installman
dh_installmenu
dh_fixperms -a
dh_compress -a
dh_strip -a
strip -x -s -R .comment -R .note debian/cinelerra/usr/lib/cinelerra/*.so
# AFAIK bootstraping should be gone now -- minmax
# Rename defaulttheme to blondtheme
# guicast/bootstrap debian/cinelerra/usr/lib/cinelerra/blondtheme.so
plugins/defaulttheme/data/*.png
# Add bluedottheme
# guicast/bootstrap debian/cinelerra/usr/lib/cinelerra/bluedottheme.so
plugins/bluedottheme/data/*.png
# guicast/bootstrap debian/cinelerra/usr/bin/cinelerra
cinelerra/data/mode_*.png
# not present anymore?
# guicast/bootstrap debian/cinelerra/usr/lib/cinelerra/microtheme.so
plugins/microtheme/data/*.png
dh_makeshlibs -V -a
dh_shlibdeps -a
dh_gencontrol
dh_builddeb
binary: binary-indep binary-arch
checkroot:
dh_testroot