Issue with crosscompiling radeonhd 1.2.1

Help with using MiniMyth's build system

Moderator: Pablo

Post Reply
warpme
Contributor
Posts: 438
Joined: Fri Aug 26, 2005 8:17 pm

Issue with crosscompiling radeonhd 1.2.1

Post by warpme »

Pablo,

May You help me with issue related to compiling xf86-video-radeonhd ?.
Environment is mm 53
Here is console output:

Code: Select all

make[6]: Entering directory `/home/piotro/Desktop/minimyth-dev/script/xorg-7.3/xf86-video-radeonhd'
[===== NOW BUILDING:	xf86-video-radeonhd-1.2.1	=====]
	[fetch] complete for xf86-video-radeonhd.
	[checksum] complete for xf86-video-radeonhd.
	[extract] complete for xf86-video-radeonhd.
	[patch] complete for xf86-video-radeonhd.
 ==> Running configure in work/main.d/xf86-video-radeonhd-1.2.1
checking for a BSD-compatible install... //home/piotro/Desktop/minimyth-dev/images/build/usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... //home/piotro/Desktop/minimyth-dev/images/build/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i586-minimyth-linux-gnu-strip... i586-minimyth-linux-gnu-strip
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... i486-pc-linux-gnu
checking host system type... i586-minimyth-linux-gnu
checking for style of include used by make... GNU
checking for i586-minimyth-linux-gnu-gcc... i586-minimyth-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i586-minimyth-linux-gnu-gcc accepts -g... yes
checking for i586-minimyth-linux-gnu-gcc option to accept ISO C89... none needed
checking dependency style of i586-minimyth-linux-gnu-gcc... gcc3
checking for a sed that does not truncate output... //home/piotro/Desktop/minimyth-dev/images/build/usr/bin/sed
checking for grep that handles long lines and -e... //home/piotro/Desktop/minimyth-dev/images/build/usr/bin/grep
checking for egrep... //home/piotro/Desktop/minimyth-dev/images/build/usr/bin/grep -E
checking for ld used by i586-minimyth-linux-gnu-gcc... i586-minimyth-linux-gnu-ld
checking if the linker (i586-minimyth-linux-gnu-ld) is GNU ld... yes
checking for i586-minimyth-linux-gnu-ld option to reload object files... -r
checking for BSD-compatible nm... i586-minimyth-linux-gnu-nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... i586-minimyth-linux-gnu-cpp
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether i586-minimyth-linux-gnu-g++ accepts -g... yes
checking dependency style of i586-minimyth-linux-gnu-g++... gcc3
checking how to run the C++ preprocessor... i586-minimyth-linux-gnu-g++ -E
checking for i586-minimyth-linux-gnu-g77... no
checking for i586-minimyth-linux-gnu-xlf... no
checking for i586-minimyth-linux-gnu-f77... no
checking for i586-minimyth-linux-gnu-frt... no
checking for i586-minimyth-linux-gnu-pgf77... no
checking for i586-minimyth-linux-gnu-cf77... no
checking for i586-minimyth-linux-gnu-fort77... no
checking for i586-minimyth-linux-gnu-fl32... no
checking for i586-minimyth-linux-gnu-af77... no
checking for i586-minimyth-linux-gnu-xlf90... no
checking for i586-minimyth-linux-gnu-f90... no
checking for i586-minimyth-linux-gnu-pgf90... no
checking for i586-minimyth-linux-gnu-pghpf... no
checking for i586-minimyth-linux-gnu-epcf90... no
checking for i586-minimyth-linux-gnu-gfortran... no
checking for i586-minimyth-linux-gnu-g95... no
checking for i586-minimyth-linux-gnu-xlf95... no
checking for i586-minimyth-linux-gnu-f95... no
checking for i586-minimyth-linux-gnu-fort... no
checking for i586-minimyth-linux-gnu-ifort... no
checking for i586-minimyth-linux-gnu-ifc... no
checking for i586-minimyth-linux-gnu-efc... no
checking for i586-minimyth-linux-gnu-pgf95... no
checking for i586-minimyth-linux-gnu-lf95... no
checking for i586-minimyth-linux-gnu-ftn... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 98304
checking command to parse i586-minimyth-linux-gnu-nm output from i586-minimyth-linux-gnu-gcc object... ok
checking for objdir... .libs
checking for i586-minimyth-linux-gnu-ar... i586-minimyth-linux-gnu-ar
checking for i586-minimyth-linux-gnu-ranlib... i586-minimyth-linux-gnu-ranlib
checking for i586-minimyth-linux-gnu-strip... (cached) i586-minimyth-linux-gnu-strip
checking if i586-minimyth-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for i586-minimyth-linux-gnu-gcc option to produce PIC... -fPIC
checking if i586-minimyth-linux-gnu-gcc PIC flag -fPIC works... yes
checking if i586-minimyth-linux-gnu-gcc static flag -static works... yes
checking if i586-minimyth-linux-gnu-gcc supports -c -o file.o... yes
checking whether the i586-minimyth-linux-gnu-gcc linker (i586-minimyth-linux-gnu-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by i586-minimyth-linux-gnu-g++... i586-minimyth-linux-gnu-ld
checking if the linker (i586-minimyth-linux-gnu-ld) is GNU ld... yes
checking whether the i586-minimyth-linux-gnu-g++ linker (i586-minimyth-linux-gnu-ld) supports shared libraries... yes
checking for i586-minimyth-linux-gnu-g++ option to produce PIC... -fPIC
checking if i586-minimyth-linux-gnu-g++ PIC flag -fPIC works... yes
checking if i586-minimyth-linux-gnu-g++ static flag -static works... yes
checking if i586-minimyth-linux-gnu-g++ supports -c -o file.o... yes
checking whether the i586-minimyth-linux-gnu-g++ linker (i586-minimyth-linux-gnu-ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for i586-minimyth-linux-gnu-gcc... (cached) i586-minimyth-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether i586-minimyth-linux-gnu-gcc accepts -g... (cached) yes
checking for i586-minimyth-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking dependency style of i586-minimyth-linux-gnu-gcc... (cached) gcc3
checking for i586-minimyth-linux-gnu-pkg-config... no
checking for pkg-config... //home/piotro/Desktop/minimyth-dev/images/build/usr/bin/pkg-config
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.
checking pkg-config is at least version 0.9.0... yes
checking if RANDR is defined... yes
checking if RENDER is defined... yes
checking if XV is defined... yes
checking if DPMSExtension is defined... yes
checking if XSERVER_LIBPCIACCESS is defined... no
checking for XORG... yes
checking for ANSI C header files... (cached) yes
checking for PCIUTILS... no
configure: WARNING: libpci not registered in pkgconfig, will guess instead
checking pci/pci.h usability... no
checking pci/pci.h presence... no
checking for pci/pci.h... no
configure: WARNING: Caution: Will not compile rhd_conntest without pciutils headers.
checking whether to enable EXA support... yes
checking exa.h usability... yes
checking exa.h presence... yes
checking for exa.h... yes
checking whether EXA version is at least 2.0.0... yes
checking /usr/include/xorg/xf86_ansic.h usability... no
checking /usr/include/xorg/xf86_ansic.h presence... no
checking for /usr/include/xorg/xf86_ansic.h... no
checking for MonRec.reducedblanking... no
checking for MonRec.maxPixClock... no
checking for ./src/AtomBios/includes/atombios.h... configure: error: cannot check for file existence when cross compiling
make[6]: *** [configure-work/main.d/xf86-video-radeonhd-1.2.1/configure] Error 1
make[6]: Leaving directory `/home/piotro/Desktop/minimyth-dev/script/xorg-7.3/xf86-video-radeonhd'
make[5]: *** [../../xorg-7.3/xf86-video-radeonhd/cookies/main.d/install] Error 2
make[5]: Leaving directory `/home/piotro/Desktop/minimyth-dev/script/xorg-7.3/xorg'
make[4]: *** [imgdep-main] Error 2
make[4]: Leaving directory `/home/piotro/Desktop/minimyth-dev/script/xorg-7.3/xorg'
make[3]: *** [../../xorg-7.3/xorg/cookies/main.d/install] Error 2
make[3]: Leaving directory `/home/piotro/Desktop/minimyth-dev/script/xorg/xorg'
make[2]: *** [imgdep-main] Error 2
make[2]: Leaving directory `/home/piotro/Desktop/minimyth-dev/script/xorg/xorg'
make[1]: *** [../../xorg/xorg/cookies/main.d/install] Error 2
make[1]: Leaving directory `/home/piotro/Desktop/minimyth-dev/script/meta/minimyth'
make: *** [imgdep-main] Error 2
Done...
piotro@MiniMyth-Dev:~/Desktop/minimyth-dev/script/meta/minimyth$ 
makefile is following:

Code: Select all

GARNAME = xf86-video-radeonhd
GARVERSION_TYPE = 1.2.1
GARVERSION = $(strip $(if $(filter git,$(GARVERSION_TYPE)) , \
	f4bdc127ff399d5e2cd10312aea38cc192bb7ac1 , \
	1.2.1 ))
CATEGORIES = $(CATEGORY)
MASTER_SITES = $(strip $(if $(filter git,$(GARVERSION_TYPE)) , \
	git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd/ , \
	$(XORG_MASTER_SITES) ))
DISTFILES = $(DISTNAME).tar.bz2
PATCHFILES = 
LICENSE = $(GARNAME)
$(GARNAME)_LICENSE_TEXT = $(WORKSRC)/COPYING

DESCRIPTION = 
define BLURB
endef

DEPENDS = lang/c \
	$(CATEGORY)/fontsproto \
	$(CATEGORY)/glproto \
	$(CATEGORY)/libdrm \
	$(CATEGORY)/libX11 \
	$(CATEGORY)/libXvMC \
	$(CATEGORY)/randrproto \
	$(CATEGORY)/renderproto \
	$(CATEGORY)/xextproto \
	$(CATEGORY)/xf86driproto \
	$(CATEGORY)/xineramaproto \
	$(CATEGORY)/xorg-server \
	$(CATEGORY)/xproto
BUILDDEPS = \
	$(CATEGORY)/util-macros \
	$(CATEGORY)/xorg-server \
	$(CATEGORY)/xorg-sgml-doctools

CATEGORY := $(shell basename $(shell dirname $(shell pwd)))

CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS     = $(WORKSRC)/Makefile
INSTALL_SCRIPTS   = $(WORKSRC)/Makefile

CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \
	--enable-maintainer-mode

GAR_EXTRA_CONF += $(CATEGORY)/xorg/package-api.mk
include ../../gar.mk


pre-configure:
	@rm -rf $(WORKSRC)/autom4te.cache
	@cd $(WORKSRC) ; autoreconf --verbose --install --force
	@$(MAKECOOKIE)

post-install:
	@$(MAKECOOKIE)
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

I suggest that you do the following.

Add

Code: Select all

--cache-file=config.cache
to your CONFIGURE_ARGS

Add

Code: Select all

@rm -f $(WORKSRC)/config.cache
@echo "`echo ac_cv_file_./src/AtomBios/includes/atombios.h | sed -e 's%[^a-zA-Z0-9]%_%g'`=yes" >> $(WORKSRC)/config.cache
to your pre-configure:
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
warpme
Contributor
Posts: 438
Joined: Fri Aug 26, 2005 8:17 pm

Post by warpme »

Pablo,

Thx.
It almost works.
With following MakeFIle

Code: Select all

GARNAME = xf86-video-radeonhd
GARVERSION_TYPE = git
GARVERSION = $(strip $(if $(filter git,$(GARVERSION_TYPE)) , \
	f4bdc127ff399d5e2cd10312aea38cc192bb7ac1 , \
	1.2.1 ))
CATEGORIES = $(CATEGORY)
MASTER_SITES = $(strip $(if $(filter git,$(GARVERSION_TYPE)) , \
	git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd/ , \
	$(XORG_MASTER_SITES) ))
DISTFILES = $(DISTNAME).tar.bz2
PATCHFILES = 
LICENSE = $(GARNAME)
$(GARNAME)_LICENSE_TEXT = $(WORKSRC)/COPYING

DESCRIPTION = 
define BLURB
endef

DEPENDS = lang/c \
	$(CATEGORY)/fontsproto \
	$(CATEGORY)/glproto \
	$(CATEGORY)/libdrm \
	$(CATEGORY)/libX11 \
	$(CATEGORY)/libXvMC \
	$(CATEGORY)/randrproto \
	$(CATEGORY)/renderproto \
	$(CATEGORY)/xextproto \
	$(CATEGORY)/xf86driproto \
	$(CATEGORY)/xineramaproto \
	$(CATEGORY)/xorg-server \
	$(CATEGORY)/xproto
BUILDDEPS = \
	$(CATEGORY)/util-macros \
	$(CATEGORY)/xorg-server \
	$(CATEGORY)/xorg-sgml-doctools

CATEGORY := $(shell basename $(shell dirname $(shell pwd)))

CONFIGURE_SCRIPTS = $(WORKSRC)/configure
BUILD_SCRIPTS     = $(WORKSRC)/Makefile
INSTALL_SCRIPTS   = $(WORKSRC)/Makefile

CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \
	--enable-maintainer-mode --cache-file=config.cache

GAR_EXTRA_CONF += $(CATEGORY)/xorg/package-api.mk
include ../../gar.mk

git//%$(DISTNAME).tar.bz2:
	@$(call FETCH_GIT, $*, $(GARVERSION), $(DISTNAME))
	@$(MAKECOOKIE)

checksum-$(DISTNAME).tar.bz2:
	@$(MAKECOOKIE)

pre-configure:
	@rm -rf $(WORKSRC)/autom4te.cache
	@rm -f $(WORKSRC)/config.cache
	@echo "`echo ac_cv_file_./src/AtomBios/includes/atombios.h | sed -e 's%[^a-zA-Z0-9]%_%g'`=yes" >> $(WORKSRC)/config.cache
	@echo "`echo ac_cv_file_$(DESTDIR)$(includedir)/xorg/damage.h | sed -e 's%[^a-zA-Z0-9]%_%g'`=yes" >> $(WORKSRC)/config.cache
	@echo "`echo ac_cv_file_./src/AtomBios/includes/Decoder.h | sed -e 's%[^a-zA-Z0-9]%_%g'`=yes" >> $(WORKSRC)/config.cache
	@cd $(WORKSRC) ; autoreconf --verbose --install --force
	@$(MAKECOOKIE)

post-install:
	@$(MAKECOOKIE)
I have error

Code: Select all

checking for /usr/include/xorg/damage.h... configure: error: cannot check for file existence when cross compiling
make[6]: *** [configure-work/main.d/xf86-video-radeonhd-f4bdc127ff399d5e2cd10312aea38cc192bb7ac1/configure] Error 1
config.cache is:

Code: Select all

ac_cv_file___src_AtomBios_includes_atombios_h=yes
ac_cv_file__home_piotro_Desktop_minimyth_dev_images_main_usr_include_xorg_damage_h=yes
ac_cv_file___src_AtomBios_includes_Decoder_h=yes
When I change to:

Code: Select all

@echo "`echo ac_cv_file_/usr/include/xorg/damage.h | sed -e 's%[^a-zA-Z0-9]%_%g'`=yes" >> $(WORKSRC)/config.cache
driver compiles OK.
Home dir for mm dev is:

Code: Select all

/home/piotro/Desktop/minimyth-dev
I understand issue is with "-" in dir name where mm dev resides. But why it compiles OK in i.e. for xf86-video-ati driver ?

br
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

It does not work with $(DESTDIR)$(includedir) because you lack the *-pkg_config.patch that you will find in the other video drivers.

The damage.h header is in the xorg-server's sdk directory. The configure script finds this using pkg-config. pkg-config returns a value for sdkdir without DESTDIR prepended, which is to be expected. The *-pkg_config.patch patches configure script so that DESTDIR (actually, PKG_CONFIG_SYSROOT_DIR which is somewhat more appropriate) is prepended to the resturned value.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
emlsnws
Contributor
Posts: 52
Joined: Wed Sep 03, 2008 9:13 am
Location: Gloucestershire, UK

Post by emlsnws »

I think Pablo posted this in the same thread as he was replying to me...
I have checked in packages for xf86-video-radeonhd.
Cheers,
Simon.
Post Reply