Recent

Author Topic: Re-compiling Lazarus hangs at "Linking"  (Read 7209 times)

edvard

  • Full Member
  • ***
  • Posts: 172
Re-compiling Lazarus hangs at "Linking"
« on: February 09, 2016, 08:30:53 am »
Hopefully, I'm posting in the right spot...
My system: Debian Linux "Testing", FreePascal 3.0.0, Lazarus 1.4.4 and 1.6RC2

OK, I prefer to use the Qt toolkit, so as soon as I got 1.4.4 and 1.6RC2 downloaded and installed, I configured "Build Lazarus" with the 'qt' option.  Compiling went as normal, but hung for half an hour before I finally killed it.  The last thing in the Messages window was "Linking ../lazarus"

Trying the advice of someone else, I tried opening a terminal in the Lazarus folder and typed:
make clean bigide LCL_PLATFORM=qt
Compiling goes as normal, but it hangs at "Linking ../lazbuild"

The only unusual thing I can see is the two dots in front of the filename instead of the normal one; other files that compile and link successfully report "Linking ./[file to be linked]" before it moves on to the the next bit to be assembled.  Linking usually takes a bit of a pause before continuing, but I let it go for half an hour before giving up.

It does this for both 1.4.4 and 1.6RC2.  I've searched the forum and can't find anybody else with this problem. Any clues?
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #1 on: February 09, 2016, 11:49:34 am »
What is your computer spec? Linking is indeed the heaviest process among every compilation phases, it also eats huge amount of RAM (200-300 MB). First time should take up to 10 seconds on my core i5-4200u with 7.6 GB of RAM, subsequent build takes 1-3 seconds.

edvard

  • Full Member
  • ***
  • Posts: 172
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #2 on: February 10, 2016, 04:12:17 am »
I have a 64-bit 3GHz AMD Phenom II (Dual core) with 4 Gigs of RAM.  Not the speediest of rigs, but easily out paces my single-core machine of just a few months ago, and I don't remember it building this slow on that one..

I left the 1.4.4 compiling overnight, and it looks like it did indeed finish at some point, so hopefully you're right that the next build will go faster.  Trying compiling the 1.6RC now... It has hung at "Linking ../lazbuild".  I'll let it go and see how long it takes.

Start: 7:09 pm
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9869
  • Debugger - SynEdit - and more
    • wiki
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #3 on: February 10, 2016, 04:24:06 am »
If linking is too slow, then make sure you do not compile with smartlinking enabled. (units can be build for smartlinking, just dont actually smartlink the IDE)

It saves hardly anything in the IDE, but it dramatically increases memory usage, and if you are a few bytes short swapping can really make it slow.

edvard

  • Full Member
  • ***
  • Posts: 172
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #4 on: February 10, 2016, 06:39:32 am »
Finished compiling about 8:00, give or take 5 minutes or so..

If linking is too slow, then make sure you do not compile with smartlinking enabled. (units can be build for smartlinking, just dont actually smartlink the IDE)

It saves hardly anything in the IDE, but it dramatically increases memory usage, and if you are a few bytes short swapping can really make it slow.

Good advice, but I don't see options for whether or not to do smart linking in the 'Tools->Configure "Build Lazarus"'  dialog.
All children left unattended will be given a mocha and a puppy.

Arch (though I may go back to Debian)| FreePascal 3.2.2 + Lazarus 2.2.4, GTK2+ and Qt.  Mostly Qt...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #5 on: February 10, 2016, 06:41:57 am »
I have a 64-bit 3GHz AMD Phenom II (Dual core) with 4 Gigs of RAM.  Not the speediest of rigs, but easily out paces my single-core machine of just a few months ago, and I don't remember it building this slow on that one..
It's a more than enough spec. Something else, must be wrong, could be the linker. You can try building on different distro, I don't use debian but here in manjaro is as what I said above.
Good advice, but I don't see options for whether or not to do smart linking in the 'Tools->Configure "Build Lazarus"'  dialog.
Put -XS in the option box (note that it's case sensitive)
« Last Edit: February 10, 2016, 09:53:38 am by Leledumbo »

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #6 on: February 10, 2016, 09:45:04 am »
Probably I am wrong, but just in case.

Linking deals extensively with the HDD. If the drive started to take longer time for usual activities, then it is time to consider preparing a backup of your important data.

jujibo

  • Full Member
  • ***
  • Posts: 116
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #7 on: February 10, 2016, 09:52:36 am »
I installed Sparky linux (debian testing based) and there is a serious problem while linking, is not Lazarus. It happens also compiling FreePascal and every project. Linking takes very long time (linking lazarus takes too much time).

All is pointing to Binutils 2.26. I don't know if this happen only in Debian Testing or also other Linux distros using Binutils 2.26 suffer this issue.

Windsurfer

  • Sr. Member
  • ****
  • Posts: 368
    • Windsurfer
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #8 on: February 10, 2016, 10:01:15 am »
Binutils 2.24 in Linux Mint 17.3 gives no trouble.

jujibo

  • Full Member
  • ***
  • Posts: 116
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #9 on: February 10, 2016, 10:09:14 am »
Yes, I also have Linux Mint 17.3 Mate and no problems.

I also have observed that projects running fine in Linux Mint, throws an exception in libpthread when closing the application in Debian Testing. For this reason, I'm not using it for now.

hallenberger

  • New Member
  • *
  • Posts: 43
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #10 on: February 10, 2016, 10:09:22 am »
I installed Sparky linux (debian testing based) and there is a serious problem while linking, is not Lazarus. It happens also compiling FreePascal and every project. Linking takes very long time (linking lazarus takes too much time).

All is pointing to Binutils 2.26. I don't know if this happen only in Debian Testing or also other Linux distros using Binutils 2.26 suffer this issue.

Here same situation. Sparky: long time linking,  "normal" Debian: normal time linking.
Debian/Sparky Linux
OS: Windows XP
Lazarus: with fpcupdeluxe

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #11 on: February 10, 2016, 10:20:54 am »
Try if you see difference between dwarf and stabs debug info

jujibo

  • Full Member
  • ***
  • Posts: 116
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #12 on: February 10, 2016, 10:47:32 am »
Try if you see difference between dwarf and stabs debug info

I'm at work right now (no SparkyLinux/Debian testing here). I'll check it later. In my case I have compiled for production so no debug info. FPC is also compiled with NOGDB=1 and takes really long linking everything.


jujibo

  • Full Member
  • ***
  • Posts: 116
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #13 on: February 10, 2016, 04:03:50 pm »
After last Debian testing upgrade: Binutils 2.26-2 to 2.26-3, linking is fast again so don't panic :)

For something is 'testing'

hallenberger

  • New Member
  • *
  • Posts: 43
Re: Re-compiling Lazarus hangs at "Linking"
« Reply #14 on: February 10, 2016, 04:47:45 pm »
Yes. Everything links fast  :D
Debian/Sparky Linux
OS: Windows XP
Lazarus: with fpcupdeluxe

 

TinyPortal © 2005-2018