View previous topic :: View next topic |
Author |
Message |
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Mon May 06, 2002 10:12 pm Post subject: Creating ebuild: Getting Access Violation errors -- FIXED |
|
|
I'm trying to create an ebuild for TOra, a toolkit for Oracle.
However in testing my script, I'm getting this error:
Code: |
>>> Install tora-1.2.3 into /var/tmp/portage/tora-1.2.3/image/ category dev-db
ACCESS DENIED mkdir: /usr/lib/tora
mkdir: cannot create directory `/usr/lib/tora': Permission denied
make: *** [install-common] Error 1
!!! ERROR: The ebuild did not complete successfully.
!!! Function src_install, Line 4, Exitcode 2
!!! make install failed
--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE = "/tmp/sandbox-tora-1.2.3-4831.log"
mkdir: /usr/lib/tora
--------------------------------------------------------------------------------
|
I originally had specified /usr/lib/tora in the configure, but took it out. I don't know why it's still doing that. Even if it is, why can't it play there?
Last edited by rizzo on Tue Jul 02, 2002 2:26 pm; edited 1 time in total |
|
Back to top |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Mon May 06, 2002 10:49 pm Post subject: |
|
|
The problem is you are leaving the /var/tmp/portage/[package_name]/[work] directory. You can't touch anything outside of that directory except in the pkg_postinstall function(i think that is the right name..). Take a peak at some other ebuilds. If you are running 'make' or 'make install' when it is choking, you can pass variables to it that override those in the Makefile.
For example, in a make file it has: PREFIX=/usr, when you run make install, the ebuild will choke because ebuild is trying to touch the live filesystem. The solution is to run 'make PREFIX=${D} install.' ${D} is set my ebuild/emerge and points to the image directory. Don't think that just configuring the package to use ${D} will work, because then you will end up compiling the binaries wrong. Usaully, you just have to worry about the make install.
Hope that helps. _________________ - Kyle Manna
Please, please SEARCH before posting.
There are three kinds of people in the world: those who can count, and those who can't. |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue May 07, 2002 12:57 pm Post subject: |
|
|
I had been looking at other ebuilds, and they specify prefix=${D}/usr in their make install lines. I never explicitly set the D env var. What is it set to? |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue May 07, 2002 1:01 pm Post subject: |
|
|
Also the first time I test out the ebuild through the 'ebuild <filename> merge'command, I get an error saying I need to run 'ebuild <filename> digest'. Why is this? |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue May 07, 2002 7:16 pm Post subject: |
|
|
It's still not working. Getting the same error as before. It fails on the src_install function. I've included src_compile and src_install below.
Code: |
src_compile() {
local myconf
use kde && myconf="$myconf --with-kde" \
|| myconf="$myconf --without-kde"
use mysql && myconf="$myconf" \
|| myconf="$myconf --without-mysql"
./configure \
--prefix=/usr \
--with-mono \
$myconf || die "configure failed"
emake || die "emake failed"
}
src_install() {
make \
DESTDIR=${D} \
install || die "make install failed"
#dodoc AUTHORS BUGS CHANGES COPYING FAQ PLATFORMS README* TODO VERSION
#cp -a doc ${D}/usr/share/doc/${PF}/html
#find ${D}/usr/share/docs/${PF}/html -name "Makefile*" -exec rm {} \;
#prepalldocs
}
|
|
|
Back to top |
|
|
tod Developer
Joined: 17 Apr 2002 Posts: 136 Location: Ozarks, USA
|
Posted: Tue May 07, 2002 8:12 pm Post subject: |
|
|
rizzo wrote: | Code: |
src_install() {
make \
DESTDIR=${D} \
install || die "make install failed"
#dodoc AUTHORS BUGS CHANGES COPYING FAQ PLATFORMS README* TODO VERSION
#cp -a doc ${D}/usr/share/doc/${PF}/html
#find ${D}/usr/share/docs/${PF}/html -name "Makefile*" -exec rm {} \;
#prepalldocs
}
|
|
Try
src_install() {
make \
prefix=${D}/usr \
install || die "make install failed"
instead. See /usr/portage/skel.ebuild
hth
tod |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue May 07, 2002 8:40 pm Post subject: |
|
|
I had already tried that, and tried again after your post, getting the same error as before.
I looked at the Makefile for the program, and see this:
Code: |
install: $(TARGET) install-common install-kde
@echo Install $(TARGET) to $(INSTALLBIN)
if [ \! -f $(TARGET) ] ; then cp tora $(TARGET) ; fi
-strip $(TARGET) plugins/* >/dev/null 2>&1
cp $(TARGET) $(INSTALLBIN)/tora
if [ -f tora-plugin ] ; then rm tora-plugin ; fi
mkdir -p $(INSTALLLIB)/tora/help
rm -f $(INSTALLLIB)/tora/*.tso
-cp plugins/* $(INSTALLLIB)/tora >/dev/null 2>&1
-cp templates/*.tpl $(INSTALLLIB)/tora >/dev/null 2>&1
-cp -r help/* $(INSTALLLIB)/tora/help >/dev/null 2>&1
|
It fails on the 'mkdir -p $(INSTALLLIB)/tora/help' line. These vars are set at the beginning of the Makefile.
Code: |
# Where to install tora
INSTALLPREFIX=$(ROOT)/usr/local
# Where to install tora binary
INSTALLBIN=$(ROOT)/usr/local/bin
# Where to install tora plugins
INSTALLLIB=$(ROOT)/usr/local/lib
|
So it doesn't look at the DESTDIR variable, nor do I find the word "prefix" anywhere in the Makefile. That $(ROOT) variable is never set in the Makefile, nor in the configure or configure.pl script. I'm kind of lost. :p |
|
Back to top |
|
|
tod Developer
Joined: 17 Apr 2002 Posts: 136 Location: Ozarks, USA
|
Posted: Wed May 08, 2002 2:44 pm Post subject: |
|
|
Hi!
It looks like you will have to excercise your sed'ing skills and change $(ROOT) to ${D} or something that has the same effect. It is safest to do the change in src_install() to ensure that the install paths aren't hardcoded into any off the installed files.
hth
tod |
|
Back to top |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Wed May 08, 2002 9:11 pm Post subject: |
|
|
tod wrote: | Hi!
It looks like you will have to excercise your sed'ing skills and change $(ROOT) to ${D} or something that has the same effect. It is safest to do the change in src_install() to ensure that the install paths aren't hardcoded into any off the installed files.
hth
tod |
Or perhaps Code: | make ROOT=${D} install |
_________________ - Kyle Manna
Please, please SEARCH before posting.
There are three kinds of people in the world: those who can count, and those who can't. |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Wed May 08, 2002 9:34 pm Post subject: |
|
|
Nitro wrote: | Code: | make ROOT=${D} install |
|
I tried that and got this:
Code: | >>> Install tora-1.3.5.1_alpha into /var/tmp/portage/tora-1.3.5.1_alpha/image/ category dev-db
Install tora-mono to /var/tmp/portage/tora-1.3.5.1_alpha/image//usr/bin
cp: cannot create regular file `/var/tmp/portage/tora-1.3.5.1_alpha/image//usr/bin/tora': No such file or directory
make: *** [install] Error 1
!!! ERROR: The ebuild did not complete successfully.
!!! Function src_install, Line 3, Exitcode 2
!!! make install failed
|
Why can't it create that stuff? Also, is that double-slash supposed to be there. I imagine that is there because ${D} ends in a /. Does that cause problems? |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue Jun 18, 2002 8:22 pm Post subject: |
|
|
Well I'm back from my forte ebuilding adventures (emerge forte you lucky listeners) and am ready to tackle this again.
Does anyone have any idea how I need to lasso this thing and make it behave? |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Thu Jun 20, 2002 3:02 am Post subject: |
|
|
Turns out there was a bug in the configure/makefile so setting the $ROOT didn't work. Author has made the fix and I'll get back to testing when I can make a tarball from CVS.
Here is the email thread regarding the problem:
http://www.geocrawler.com/lists/3/SourceForge/9281/0/8978495/ |
|
Back to top |
|
|
rizzo Retired Dev
Joined: 30 Apr 2002 Posts: 1067 Location: Manitowoc, WI, USA
|
Posted: Tue Jul 02, 2002 2:30 pm Post subject: |
|
|
https://bugs.gentoo.org/show_bug.cgi?id=4430
TOra 1.3.6 alpha has been released and my ebuild worked without a hitch. I've submitted the files (ebuild and digest) to bugzilla. Here are the file contents:
/usr/portage/dev-db/tora/tora-1.3.6_alpha.ebuild
Code: |
# TOra ebuild file
# Don Seiler, don@seiler.us
S=${WORKDIR}/tora-1.3.6
A="tora-alpha-1.3.6.tar.gz"
DESCRIPTION="TOra - Toolkit For Oracle"
SRC_URI="http://unc.dl.sourceforge.net/sourceforge/tora/${A}"
HOMEPAGE="http://www.globecom.se/tora/"
DEPEND=""
src_unpack() {
unpack ${A}
cd ${S}
}
src_compile() {
local myconf
use kde && myconf="$myconf --with-kde" \
|| myconf="$myconf --without-kde"
use mysql && myconf="$myconf" \
|| myconf="$myconf --without-mysql"
./configure \
--prefix=/usr \
--with-mono \
$myconf || die "configure failed"
emake || die "emake failed"
}
src_install() {
dodir ${D}/usr/bin
make \
ROOT=${D} \
install || die "make install failed"
#dodoc AUTHORS BUGS CHANGES COPYING FAQ PLATFORMS README* TODO VERSION
#cp -a doc ${D}/usr/share/doc/${PF}/html
#find ${D}/usr/share/docs/${PF}/html -name "Makefile*" -exec rm {} \;
#prepalldocs
}
|
/usr/portage/dev-db/tora/files/digest-tora-1.3.6_alpha
Code: | MD5 1d2e1a7d597220a68006eab8c658b9db tora-alpha-1.3.6.tar.gz 2266020 |
Please try this out and let me know if you find any bugs. Obviously you need an Oracle client installed. I recommend 9i. Least buggy of the linux clients, works all the way down to 7.3.4 server (which is what I use). |
|
Back to top |
|
|
|