Author Topic: Source code almost impossible to build in Linux  (Read 3895 times)

draethus

  • Guest
Source code almost impossible to build in Linux
« on: August 18, 2006, 02:59:02 pm »
Hi

I'm not sure whether this is the right place to post, so please tell me if not.

Let me begin by saying I am impressed with Code::Blocks in just about every way, except with compiling it under Linux.

I don't know what half-baked tool you use to create the source tarball, but for both RC1 and RC2, source and sdk tarballs, I get "lone zero block at ..." errors when untarring. All the files are there, though.

RC1 won't compile now (it did on an older Linux version) so I'll forget it.

But for RC2, there is no configure. Okay, you use ./autogen or whatever. But the permissions are wrong (644, instead of 755). And if you change them, it still doesn't work ("bad interpreter").

So I typed the commands in that file manually. Then I tried ./configure, only to get
creating Makefile
failed to create Makefile

After about an hour of exotic hacks (like strace -ff -o log ./configure), I determined the problem is that configure.in is in DOS format (\r\n), which causes autoconf to stop parsing

AC_CONFIG_FILES([Makefile^M
   ...^M
])

after the first ^M.

So I fixed that, and it configured and compiled. Then when I tried to start Code::Blocks from Gnome's menu, I get "failed to recognise text format" and it won't start. When I looked at codeblocks.desktop, there's more ^M's waiting to be deleted.

Now it finally works, but I am an expert in Linux. If it took me one and a half hours, how are other people supposed to figure all this out?

Please make it easier for us Linux users in future versions - at least mention these potential problems somewhere.

Code::Blocks holds a lot of potential, please don't let it go to waste with nightmarishly difficult builds.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Source code almost impossible to build in Linux
« Reply #1 on: August 18, 2006, 03:14:13 pm »
Out of curiosity, would you consider using sources that are less than a year old? :)

I mean seriously... trying to build Code::Blocks under Linux from the RC2 tarball is kind of self-harming.

If you want build Code::Blocks from source, you should run svn checkout svn://svn.berlios.de/codeblocks/trunk. :)

Then (supposed you have the required dependencies) try cd trunk && ./bootstrap && ./configure && make
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Source code almost impossible to build in Linux
« Reply #2 on: August 18, 2006, 03:23:53 pm »
Quote
Please make it easier for us Linux users in future versions - at least mention these potential problems somewhere.

Code::Blocks holds a lot of potential, please don't let it go to waste with nightmarishly difficult builds.

Your first stop should have been http://www.codeblocks.org/source_code.shtml. There it explains how to access the source code.
The fact that you 're trying to build an almost one year old version, is not our fault. Besides, we 're not even using sourceforge.net anymore. We will make our next release available there but until then...

You chose the hard way. It's because you 're an expert in linux. Sorry about that, but you should learn to check the project's homepage before trying to build it from source. It would have saved you the pain...
Be patient!
This bug will be fixed soon...

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Source code almost impossible to build in Linux
« Reply #3 on: August 18, 2006, 06:08:57 pm »
Maybe you should a news item on the sourceforge front page pointing people to use the SVN version from Berlios.

BentFX

  • Guest
Re: Source code almost impossible to build in Linux
« Reply #4 on: August 27, 2006, 05:42:55 pm »
Go to the Wiki...
Click on the big "Installing Code::Blocks" link...
Click the "Installing Code::Blocks from source on Linux" link...
There are the instructions...

1/2 to 2/3 of the way down you'll find explanation of the errors you were getting...

Code
(*Note// If you run ./bootstrap and get errors like:

: bad interpreter: File not found

then there exists a problem with DOS line-endings

It certainly shouldn't have required "an hour of exotic hacks" :)