compile make install error

Discussion about CodeLite development process and patches
kmindi
CodeLite Curious
Posts: 7
Joined: Sat Jul 11, 2009 9:07 pm
Contact:

compile make install error

Post by kmindi »

Hi,
I got a package build file for codelite under Arch Linux.
That PKGBUILD file tells the makepkg tool how to create a package for Arch Linux that then can be installed with the pkg handling tool pacman.
The important part of that file is the following:

Code: Select all

_svnmod="codelite"
_svntrunk="https://codelite.svn.sourceforge.net/svnroot/codelite/trunk"
build() {
  cd $srcdir/
  msg "Getting source..."
  if [ -d $_svnmod/.svn ]; then
    (cd $_svnmod && svn --config-dir ../ up -r $pkgver)
  else
    svn --config-dir ./ co $_svntrunk  -r $pkgver $_svnmod
  fi

  msg "SVN checkout done or server timeout"
  msg "Creating make environment..."
  rm -rf $srcdir/$_svnmod-build
  cp -r $srcdir/$_svnmod $srcdir/$_svnmod-build
  cd $srcdir/$_svnmod-build
  msg "Starting make..."
  ./configure --prefix=/usr 
  make || return 1
  make DESTDIR=$pkgdir install
  rm -rf $srcdir/$_svnmod-build
}
(complete file : http://aur.archlinux.org/packages/codel ... n/PKGBUILD)

It does a svn checkout (or if previously checked out only an update) then it configures the MAKEFILE and starts the make process
And then it is going to install the compilated things to the pkg dir from where the makepkg then generates a installable package. But it does not get this far, I get the following errors:
........
dk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
Uninstalling CodeLite
cp lib/Debugger.so /home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/lib/codelite/debuggers/
installing CodeLite
cp: reguläre Datei „/home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/lib/codelite/debuggers/“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden (IN ENGLISH: could not be created file or folder not found)
make: *** [Debugger_install] Fehler 1
make: *** Warte auf noch nicht beendete Prozesse... (waiting for not ended processes...)
Does this look like the fixed bug : http://codelite.svn.sourceforge.net/vie ... ision=3737
Maybe its not a codelite problem but maybe it is?
Last edited by kmindi on Sat Feb 13, 2010 7:20 pm, edited 1 time in total.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: compile make install error

Post by DavidGH »

Hi,
Does this look like the fixed bug : http://codelite.svn.sourceforge.net/vie ... ision=3737
No. That would have broken compilation, not the install; and you're not using make -j2 anyway.

The likely problem is that you're using --prefix= but not --plugins-dir=. If you use one, you also need to do the other. You can set it to /usr too, or anywhere else you like.

If that's not it, looking at the output I suggest that you check that lib/Debugger.so does exist. If not, is Debugger.so being placed somewhere else?
(I presume the "SVN checkout done or server timeout" message isn't the problem.)

Regards,

David
kmindi
CodeLite Curious
Posts: 7
Joined: Sat Jul 11, 2009 9:07 pm
Contact:

Re: compile make install error

Post by kmindi »

DavidGH wrote: ...
The likely problem is that you're using --prefix= but not --plugins-dir=. If you use one, you also need to do the other. You can set it to /usr too, or anywhere else you like.
I tried that now, it gives me a different error but looks somehow similar.
DavidGH wrote: If that's not it, looking at the output I suggest that you check that lib/Debugger.so does exist. If not, is Debugger.so being placed somewhere else?
(I presume the "SVN checkout done or server timeout" message isn't the problem.)
No the checkout isnt the problem.

Here the new errors:

Code: Select all

Uninstalling CodeLite
cp lib/Debugger.so /home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/debuggers/
installing CodeLite
cp: reguläre Datei „/home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/debuggers/“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
make: *** [Debugger_install] Fehler 1
make: *** Warte auf noch nicht beendete Prozesse...
cp: reguläre Datei „/home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/bin/“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
make: *** [core_install] Fehler 1
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: compile make install error

Post by DavidGH »

I've no experience with Arch packaging, but the script looks straight-forward enough. It uses $DESTDIR, which the CodeLite configure should honour OK; but could you have a look at the makefile that's generated during the build to see that there are lines:
@mkdir -p $(DESTDIR)/usr/lib/debuggers
and
@cp -fpr lib/Debugger.so $(DESTDIR)/usr/lib/debuggers/

However I see that the first error refers to usr/debuggers/ rather than usr/lib/debuggers/. What configure line did you use this time?
kmindi
CodeLite Curious
Posts: 7
Joined: Sat Jul 11, 2009 9:07 pm
Contact:

Re: compile make install error

Post by kmindi »

My configure line is now the following (in the PKGBUILD file):

Code: Select all

./configure --prefix=/usr --plugins-dir=/usr
My Makefile has the that copy process for Debugger.so appearing two times:

Code: Select all

core_install:
....
@mkdir -p $(DESTDIR)/usr/debuggers
....
@cp -fpr lib/Debugger.so $(DESTDIR)/usr/debuggers/
...
And further down there is this one:

Code: Select all

Debugger_install:
	cp $(OUTPUT_DIR)/Debugger.so $(DESTDIR)/usr/debuggers/
Is it doing that copy twice then? Speaking one time in core_install and the second time in Debugger_install (from plugins_install)

Error message:
cp lib/Debugger.so /home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/debuggers/
installing CodeLite
Uninstalling CodeLite
cp: reguläre Datei „/home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/debuggers/“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
make: *** [Debugger_install] Fehler 1
Im not sure this is helpful but I put the Makefile on pastebin :
http://pastebin.com/m71698a12
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: compile make install error

Post by DavidGH »

However I see that the first error refers to usr/debuggers/ rather than usr/lib/debuggers/
Sorry, forget I said that: I was looking at my makefile, and I configure with --plugins-dir=/foo/lib. You're using /usr, so the makefile is correct.
My Makefile has the that copy process for Debugger.so appearing two times
Strange, but it shouldn't matter.

Thank you for pastebinning the makefile; however it looks fine to me.

Are you able to look inside /home/myusername/temp/arch_pkgs/codelite-svn/pkg/usr/ with a file manager to see what's really happening?
The only other thing I can think of is to hack some 'echo' statements into the makefile while CodeLite is compiling, so that you can see which cp is failing, and if the mkdir has happened by then e.g.

Code: Select all

	@echo "About to do plugin debugger install"
kmindi
CodeLite Curious
Posts: 7
Joined: Sat Jul 11, 2009 9:07 pm
Contact:

Re: compile make install error

Post by kmindi »

Now DavidGH and I found out that there is a make flag set in a general config file in Arch Linux that configures the makepkg program which does the build process of custom packages.
I had set MAKEFLAGS="j3" so it did parallelization on the make process.
But that does not work with the current Makefile of codelite.
If I edit the PKGBUILD to use

Code: Select all

make -j1 DESTDIR=$pkgdir install
instead of

Code: Select all

make DESTDIR=$pkgdir install
it works as it should.
So maybe the configure script should be edited to support parallelization of the install process. Build process is parallelized too, and there it works like a charm.
Post Reply