no executable after compiling from sources

CodeLite installation/troubleshooting forum
marines
CodeLite Curious
Posts: 8
Joined: Wed Jun 09, 2010 7:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

no executable after compiling from sources

Post by marines »

According to instructions here after doing make install CodeLite should be installed. But where is main executable? Compilation is done without any errors and the only provided executables are codelite_cppcheck, codelite_indexer, etc. No one is CodeLite exec. What's more even in Makefile there is no information about such executable. I'm using 64bit Arch Linux BTW. I'm surprised that there is no such problem described on the board (nobody compiles CodeLite?). :/ What should i do?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable after compiling from sources

Post by eranif »

You should be having the executable here:
/usr/bin/codelite (lower case)

if not, then attach here the output of the build and I will have a look at it

Eran
Make sure you have read the HOW TO POST thread
marines
CodeLite Curious
Posts: 8
Joined: Wed Jun 09, 2010 7:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: no executable after compiling from sources

Post by marines »

Very strange thing. This time compilation didn't succeed, but codelite executable appeared. :shock: It looks like everything works great. All in all it's not the first time when compilation finished without main codelite binary. Don't know what it depends on.

I've put last build log on my own host because of quite big size of the file (Arch AUR package).

make install didn't succeed but package has been created because make errors are ignored in this PKGBUILD. I didn't remove codelite package before new build so perhaps the only lacking file has been supplied with the damaged build? :lol: Dunno.

I'd be glad if I can help fixing this bug (or feature? :D). BTW sorry for my English. ;)
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: no executable after compiling from sources

Post by eranif »

I suspect that this is related to the fact that your PKG tool is building using make -j2 (or more) and codelite's makefiles are not compatible with that.
I believe that DavidGH addressed this issue in another post on this forum:

http://codelite.org/forum/viewtopic.php ... UILD#p3548

Eran
Make sure you have read the HOW TO POST thread
marines
CodeLite Curious
Posts: 8
Joined: Wed Jun 09, 2010 7:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: no executable after compiling from sources

Post by marines »

Right, I have set -j3 for make. I've done 4 another builds with different settings and each succeeded. Never mind right now. When the problem will appear again I'll save buidl log and let you know here.
marines
CodeLite Curious
Posts: 8
Joined: Wed Jun 09, 2010 7:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: no executable after compiling from sources

Post by marines »

There it is. I wanted to compile latest release of CodeLite with this PKGBUILD:

Code: Select all

pkgname=codelite
pkgver=2.6.0.4189
pkgrel=1
pkgdesc="CodeLite, an open-source, cross platform IDE for the C/C++ programming languages."
arch=("i686" "x86_64")
license=('GPL')
url="http://codelite.org/"
depends=('wxgtk>=2.8.4')
makedepends=('subversion')
conflicts=('codelite')
replaces=('codelite')
provides=('codelite')
source=(http://downloads.sourceforge.net/project/codelite/Releases/codelite-2.6.0/codelite-$pkgver.tar.gz)
md5sums=('17416a3bb47d6875ac6b178647032bca')

build() {
  cd $srcdir/codelite-$pkgver
  msg "Starting make..."

  ./configure --prefix=/usr 
  make || return 1
  make DESTDIR=$pkgdir install
}
Compilation and package creation succeeded but there is no codelite executable.
You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: no executable after compiling from sources

Post by DavidGH »

Hi,
Compilation and package creation succeeded but there is no codelite executable.
Strange. You do seem to create the executable, in the line near the end that starts:
g++ -DON_64_BIT -O3 -DREGEXP_UNICODE -o Runtime/codelite...

If it still exists, can you have a look in $srcdir/codelite-$pkgver/Runtime/ and confirm that there is a 'codelite' executable there.

Rather than not being created, perhaps it isn't installing; either to $DESTDIR/bin/ or (less likely) to /usr/bin/ when the package itself is installed :/. I've had rare, unreproducible instances of that sort of thing happening when the destination dir didn't previously exist. I can't see where in the 'configure' script that failure arises, but maybe it's a race condition.

FWIW, after http://codelite.org/forum/viewtopic.php ... UILD#p3548 the 'configure' script was improved, and I can now build reliably using -j2 or 4. Admittedly I've not tried -j3, though.

Regards,

David
marines
CodeLite Curious
Posts: 8
Joined: Wed Jun 09, 2010 7:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: no executable after compiling from sources

Post by marines »

Right, there is codelite executable in Runtime dir. And it works. But I don't have any clue why it installs this way.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: no executable after compiling from sources

Post by DavidGH »

Hmm. I've just tried -j3, no problems. I've also tested using a DESTDIR; still OK.

Does your script now fail reliably? If so, could you try altering the 'configure' script, replacing lines 535-6 in the createInstallTarget() section the lines:

Code: Select all

	echo "	@mkdir -p \$(DESTDIR)$prefix/bin" >> Makefile
	echo "	@cp \$(EXE_NAME) \$(DESTDIR)$prefix/bin/" >> Makefile
with

Code: Select all

	#echo "	@mkdir -p \$(DESTDIR)$prefix/bin" >> Makefile
	echo "	@mkdir -p \$(DESTDIR)$prefix/bin && cp \$(EXE_NAME) \$(DESTDIR)$prefix/bin/" >> Makefile
and see if that solves the problem. TIA
marines
CodeLite Curious
Posts: 8
Joined: Wed Jun 09, 2010 7:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: no executable after compiling from sources

Post by marines »

Weird. It happened before but after few attempts it ran well. Look:

Code: Select all

...
==========================================================
Done, please run sudo make install.
==========================================================
Uninstalling CodeLite
installing CodeLite
cp lib/Debugger.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/debuggers/
cp lib/Gizmos.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/cscope.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/Subversion2.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/CodeFormatter.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/Copyright.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp: cannot create regular file `/home/marines/packages/codelite-svn/pkg/usr/lib/codelite/': Is directory
make: *** [Copyright_install] Error 1
make: *** Waiting for unfinished tasks....
    Interrupting...
Dunno if the error sounds the same in English locales coz I'm using Polish locales and I translated it. It's damn strange. o_0

I made the change in configure script but for now compilation wasn't successfull. I hope we will fix it anyway. :)

I'm trying latest 2.7 release.

Later:

Code: Select all

...
==========================================================
Done, please run sudo make install.
==========================================================
Uninstalling CodeLite
installing CodeLite
cp lib/Debugger.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/debuggers/
cp lib/Gizmos.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/cscope.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/Subversion2.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/CodeFormatter.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/Copyright.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/UnitTestCPP.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/ExternalTools.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
rm: cannot unlink `/home/marines/packages/codelite-svn/pkg/usr/lib/codelite': Directory isn't empty
make: *** [uninstall] Error 1
make: *** Waiting for unfinished tasks....
    Interrupting...
It looks quite random.

Code: Select all

...
==========================================================
Done, please run sudo make install.
==========================================================
Uninstalling CodeLite
installing CodeLite
cp lib/Debugger.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/debuggers/
cp lib/Gizmos.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp lib/cscope.so /home/marines/packages/codelite-svn/pkg/usr/lib/codelite/
cp: cannot create reguar file `/home/marines/packages/codelite-svn/pkg/usr/lib/codelite/': Is directory
make: *** [uninstall] Error 1
make: *** Waiting for unfinished tasks....
    Interrupting...
Post Reply