aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Problem: Compiling with --enable-optimize  (Read 2495 times)

PsychoChris

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
Problem: Compiling with --enable-optimize
« on: July 13, 2004, 12:24:41 AM »

Hi there,

first of all i have to say that RC4 is a wonderful piece of work! Many (even much more than only many...) bugs were killed and it makes a quite goot impression.
But... (you knew that this 'but' would come...) ... when i try to compile it with enabled optimisation it never finishes. I hear my computer working and working, but nothing seems to happen at this point:

if g++ -DHAVE_CONFIG_H -I. -I. -I..     -I/usr/lib/wx/include/gtk-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/opt/gnome/include -I/opt/gnome/include/gtk-1.2 -I/opt/gnome/include/glib-1.2 -I/opt/gnome/lib/glib/include -I/usr/X11R6/include    -I/usr/include/ -D__CRYPTO_MDK_SUSE_FC__  -O2  -MT amule-PrefsUnifiedDlg.o -MD -MP -MF ".deps/amule-PrefsUnifiedDlg.Tpo" \
  -c -o amule-PrefsUnifiedDlg.o `test -f 'PrefsUnifiedDlg.cpp' || echo './'`PrefsUnifiedDlg.cpp; \
then mv -f ".deps/amule-PrefsUnifiedDlg.Tpo" ".deps/amule-PrefsUnifiedDlg.Po"; \
else rm -f ".deps/amule-PrefsUnifiedDlg.Tpo"; exit 1; \
fi

That's what i see on the screen and what never seems to finish even after hours. Canceling with [CTRC+C] gives the following output:

make[4]: *** [amule-PrefsUnifiedDlg.o] Interrupt
make[3]: *** [all-recursive] Interrupt
make[2]: *** [all] Interrupt
make[1]: *** [all-recursive] Interrupt
make: *** [all] Interrupt

I rebootet, typed 'make clean' an tried it again, but nothing changed. I called configure with following arguments:

./configure --enable-webserver --disable-debug --enable-optimize --enable-amulecmd

If i remove '--enable-optimize' compiling finishes after 10 minutes. Any ideas what the problem could be? And what exactly does --enable-optimize?

Greetings,
PsychoChris
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Problem: Compiling with --enable-optimize
« Reply #1 on: July 13, 2004, 01:07:20 AM »

This is a problem with gcc-3.3.1, so I'm afraid that you'll have to update to a never version of gcc if you wish to compile with optimisations enabled. =/
Logged

PsychoChris

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
Re: Problem: Compiling with --enable-optimize
« Reply #2 on: July 13, 2004, 01:35:55 AM »

Well, that Info helped. Thanks!

But is it worth compiling with --enable-optimize? What exactly will be optimized?

Greetings,
Chris
Logged

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: Problem: Compiling with --enable-optimize
« Reply #3 on: July 13, 2004, 01:47:39 AM »

I'm not entirely sure, but from what I can see from a quick look in configure.in, all you get is the CXXFLAG -O2.
Logged

PsychoChris

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 66
Re: Problem: Compiling with --enable-optimize
« Reply #4 on: July 13, 2004, 01:52:24 AM »

Sorry for my lack of knowledge, but what effect does that Flag have?

Greetings,
PsychoChris
Logged

Supersnail

  • Full Member
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 186
Re: Problem: Compiling with --enable-optimize
« Reply #5 on: July 13, 2004, 10:53:14 AM »

From http://freshmeat.net/articles/view/730/

Quote
The -O2 flag turns on the following flags:

    * -O1, which turns on:
          o defer pop (see -fno-defer-pop)
          o -fthread-jumps
          o -fdelayed-branch (on, but specific machines may handle it differently)
          o -fomit-frame-pointer (only on if the machine can debug without a frame pointer; otherwise, you need to specify)
          o guess-branch-prob (see -fno-guess-branch-prob)
          o cprop-registers (see -fno-cprop-registers)
    * -foptimize-sibling-calls
    * -fcse-follow-jumps
    * -fcse-skip-blocks
    * -fgcse
    * -fexpensive-optimizations
    * -fstrength-reduce
    * -frerun-cse-after-loop
    * -frerun-loop-opt
    * -fcaller-saves
    * -flag_force_mem
    * peephole2 (a machine-dependent option; see -fno-peephole2)
    * -fschedule-insns (if supported by the target machine)
    * -fregmove
    * -fstrict-aliasing
    * -fdelete-null-pointer-checks
    * reorder blocks

There's no point in using -O2 -fstrength-reduce, etc., since O2 implies all this.

In the names of the optimizations you might see what it does.
Logged

thepolish

  • Hero Member
  • *****
  • Karma: 2
  • Offline Offline
  • Posts: 896
Re: Problem: Compiling with --enable-optimize
« Reply #6 on: July 13, 2004, 01:35:24 PM »

Hi,

Not a problem with aMule, just with your compiler: Here compile fine with "-O2 -march=i586 -mcpu=pentiumpro -fomit-frame-pointer" (Mandrake default) with gcc 3.2.2

update it :)

the Polish
Logged
Only after the last tree has been cut down
Only after the last river has been poisoned
Only after the last fish has been caught
Only then you will find out that money cannot be eaten
(Cree Prophecy)