Building Packages

Help with using MiniMyth's build system

Moderator: Pablo

Post Reply
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Building Packages

Post by jamat13 »

Hi after spending a few days reading and building I've discovered that I'm on the wrong road.
I did everything I thought I needed to do to build rxvt. My version was 2.7.10 but all I did was cause gar-minimyth to build their 2.6.4
Kewl I have rxvt, but I want to build other packages that minimyth does not have in stock.
I have abc-1.0.tar.gz. It builds via configure and make. Can somebody guide me please?
OK
Specialized recording with text overlay http://www.decadenet.com/XBOB/XBOB.html
Thanks
James
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Building Packages

Post by jamat13 »

OK a different way to ask the same question:
my .minimyth/minimyth.conf.mk
mm_HOME = $(HOME)/gar-minimyth
mm_DISTRIBUTION_NFS = no
mm_USER_PACKAGES = vtext
mm_USER_BIN_LIST = rxvt

~/gar-minimyth/scripts/vtext/checksums
3e65a72097168cd0411b60509b4da017 vtext-1.1.tar.gz

~/gar-minimyth/scripts/vtext/Makefile
GARNAME = vtext
GARVERSION = 1.0
CATEGORIES =
MASTER_SITES = http://tigger.ws/downloads
DISTFILES = $(DISTNAME).tar.gz
LICENSE = GPL2

DESCRIPTION =
define BLURB
endef

DEPENDS = lang/c qt/qt4

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

CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST) \
--with-gnu-ld

include ../category.mk

pre-configure:
@$(call FIX_LIBTOOL,$(WORKSRC)/configure)
@$(MAKECOOKIE)

But all of this is in vain, vtext is not built, which it is by running ./configure. What am I doing wrong?
Thanks
James
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Building Packages

Post by Pablo »

The GAR package directory structure is: script/<category>/<package>. Based you what you have posted, you appear to have created your package at the category level using the category level (script/vtext) make file (it contains "include ../category.mk" rather than "include ../../gar.mk"). I would suggest creating a category directory 'script/user', copy 'script/meta/Makefile' into 'script/user', move 'script/vtext' to 'script/user/vtext' and change the value of mm_USER_PACKAGES to user/vtext. After that, there are a couple script/user/vtext/Makefile changes. First, replace "include ../category.mk" with "../../include/gar.mk". Second, add a trailing slash to the MASTER_SITES value (i.e. http://tigger.ws/downloads/).
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Building Packages

Post by jamat13 »

Nearly all done, thanks for showing me the uncrossed 't's and undotted 'i's :)
How do I refer to the build path. eg I've got
-rwxr-xr-x 1 jam users 4570931 2009-05-20 12:11 ./images/main/usr/lib/qt4/bin/qmake
but
==> Extracting download/vtext-1.1.tar.gz
[extract] complete for vtext.
[patch] complete for vtext.
make[3]: Entering directory `/home/jam/gar-minimyth/script/user/vtext'
make[3]: `../../lang/c/cookies/main.d/install' is up to date.
make[3]: `../../qt/qt4/cookies/main.d/install' is up to date.
make[3]: Leaving directory `/home/jam/gar-minimyth/script/user/vtext'
==> Running configure in work/main.d/vtext-1.1
./configure: line 4: qmake: command not found
./configure: line 5: qmake: command not found
Thanks
James
PS Yes I've spent hours trying to see how myth does it :cry:
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Building Packages

Post by Pablo »

Configure scripts are not consistent. Therefore, without know what is inside the configure script, I can only guess at the solution.

However, a couple of things to note. The build system cannot find qmake just by running qmake, because bin directories for qt3 and qt4 are not in build system's PATH variable. For qt3, there is an environment variable QTDIR is used to set the root qt3 directory. The MythTV 0.21 sets this in script/myth-0.21/myth/package-api.mk. The MythTV 0.21 uses QTDIR to find qmake. For qt4, there is no such environment variable. MythTV trunk finds qmake by having it set as a configuration variable.

If the configure script just runs qmake, then you will need to add the qt4 bin directory to your path. You can do this by adding
PATH := $(PATH):$(DESTDIR)$(qt4bindir)
below the line
include ../../gar.mk
If the configure script does something else, then I cannot guess at a solution with out seeing the configure script.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Building Packages

Post by jamat13 »

Pablo
Thanks for answering questions beyond the call of duty :D
The above works perfectly and should be a good reference point for anybody wanting to use minimyth in unusual ways.
Again thanks
James
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Building Packages

Post by Pablo »

I am glad that it worked.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Building Packages

Post by jamat13 »

Hi one tiny last gasp :D please:
Everything builds (and it works) except that my vtext and libaries are in the image
but not in the archive (and not in the squash image)

[eeyore] /home/jam/gar-minimyth [54]% find images -name vtext
images/main/usr/bin/vtext
... (license, versions)

as well as libQtCore, libQtGui and libQtXml
Putting all of them in the squash image and rebuilding squash results in everything ok.

Here are my relevant files:
~/.minimyth/minimyth.cong.mk
mm_HOME = $(HOME)/gar-minimyth
mm_DISTRIBUTION_NFS = no
mm_USER_PACKAGES = user/vtext
mm_USER_BIN_LIST = rxvt

[eeyore] /home/jam/gar-minimyth [56]% cat script/user/vtext/Makefile
GARNAME = vtext
GARVERSION = 1.1
CATEGORIES = user
MASTER_SITES = http://tigger.ws/
DISTFILES = $(DISTNAME).tar.gz
LICENSE = GPL2

DESCRIPTION =
define BLURB
endef

DEPENDS = lang/c qt/qt4

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

CONFIGURE_ARGS = $(DIRPATHS) --build=$(GARBUILD) --host=$(GARHOST)

include ../../gar.mk
PATH := $(PATH):$(DESTDIR)$(qt4bindir)

pre-configure:
@$(call FIX_LIBTOOL,$(WORKSRC)/configure)
@$(MAKECOOKIE)

post-install:
@echo "destdir:$(DESTDIR) bindir:$(bindir)" >/tmp/gar
@echo "worksrc:$(WORKSRC)" >>/tmp/gar
@cp $(WORKSRC)/src/vtext $(DESTDIR)$(bindir)
@$(MAKECOOKIE)

What am I not doing?
Thanks
James
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Building Packages

Post by Pablo »

jamat13 wrote:Hi one tiny last gasp :D please:
Everything builds (and it works) except that my vtext and libaries are in the image
but not in the archive (and not in the squash image)

[eeyore] /home/jam/gar-minimyth [54]% find images -name vtext
images/main/usr/bin/vtext
... (license, versions)

as well as libQtCore, libQtGui and libQtXml
Putting all of them in the squash image and rebuilding squash results in everything ok.

Here are my relevant files:
~/.minimyth/minimyth.cong.mk
mm_HOME = $(HOME)/gar-minimyth
mm_DISTRIBUTION_NFS = no
mm_USER_PACKAGES = user/vtext
mm_USER_BIN_LIST = rxvt
Building a package does not cause anything to be included in the image. Assuming vtext is a binary, then you need to add vtext to mm_USER_BIN_LIST in your minimyth.conf.mk. MiniMyth will include any libraries on which another included file depends. Therefore, as long as the vtext binary depends on any currently missing libraries, you will not need to add the libraries to mm_USER_LIB_LIST in your minimyth.conf.mk.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Building Packages

Post by jamat13 »

And some advice, if anybody encountered this:
...
configure:6916: checking for Xpm 3.4g or better
configure:6924: error: cannot run test program while cross compiling
See `config.log' for more details. (This IS the log)

Otherwise I'll just hack configure

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

Re: Building Packages

Post by Pablo »

jamat13 wrote:And some advice, if anybody encountered this:
...
configure:6916: checking for Xpm 3.4g or better
configure:6924: error: cannot run test program while cross compiling
See `config.log' for more details. (This IS the log)

Otherwise I'll just hack configure
Unfortunately, sometimes developers using autoconf use run tests (which cannot run during cross compilation) in their configure scripts when they could use either compile or link tests instead. This is most often because the developers do not cross compile their package. Sometimes, the test can be fixed relatively easily in configure.ac (or configure.in) by using a compile or link test. If so, then I usually let the package maintainer know the problem on the fix. If not, then I hack around it.

If you point me to a location where I can download the software, then I check whether or not this is the problem.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
jamat13
Member
Posts: 11
Joined: Tue May 12, 2009 3:30 am

Re: Building Packages

Post by jamat13 »

Yup thanks for the advice. If you were curious I hacked the configure script. http://tigger.ws/fvwm-2.4.20.tar.bz2
I commented out the build tests with #jam, and all has built correctly (and gar-minimyth has the correct versions that were tested for)
While ratpoison is exactly kewl for what minimyth uses it for, it is a little primitive for my record and text overlay users.

Minimyth saved me oodles of time, and with your help with me trying to learn a complex system, it has been a very good solution.
Thanks lots
James
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Building Packages

Post by Pablo »

jamat13 wrote:Yup thanks for the advice. If you were curious I hacked the configure script. http://tigger.ws/fvwm-2.4.20.tar.bz2
I commented out the build tests with #jam, and all has built correctly (and gar-minimyth has the correct versions that were tested for)
While ratpoison is exactly kewl for what minimyth uses it for, it is a little primitive for my record and text overlay users.

Minimyth saved me oodles of time, and with your help with me trying to learn a complex system, it has been a very good solution.
Thanks lots
James
I am glad you have found the GAR based MiniMyth build system useful.

You are correct that most users would find ratpoison to be too minimalist. MiniMyth uses a window manager to support basic scripting control and to placate applications that behave incorrectly when there is no window manager. For this, the very lighweight ratpoison meets works well. Were MiniMiyth to need a window manager for use by the end user (especially were the end user to use on a mouse) , I would not use ratpoison.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Post Reply