Re: How to specify (default) compiler options and choose which compiler

2009-02-17 Thread Ceriel Jacobs
Op 16 feb 2009, om 22:21 heeft Marcus Calhoun-Lopez het volgende  
geschreven:

WARNING:
All of the things I am about to mention could very easily break
a MacPorts installation and should not be implemented lightly.

You can say that again.

I was trying to build postgresql83 with this command:
$ sudo /opt/local/bin/port -v install postgresql83 +universal  
configure.compiler=gcc-4.2 configure.optflags=-fast configure.m64=yes  
configure.march=nocona


The process hung (overnight) at run_tic.sh [1] which was related to  
ncurses dependancy, which is a dependancy of readline dependancy,  
which is a postgresql83 dependancy.



With help of -v verbose output and Rainer Müller's comment I decided  
to change two default values in

${prefix}/share/macports/Tcl/port1.0/portconfigure.tcl


for the compiler; darwin 9 { set compiler gcc-4.2 }
and for the optflag; default configure.optflags {-fast}

-m64 doesn't seem needed to be specified, it was now often double in  
commands listed in the verbose output.


One command was decided to be kept on the port command line:  
configure.march=nocona.


Also when switching portconfigure.tcl back to gcc-4.0 / -O2
$ sudo /opt/local/bin/port -v install ncurses +universal
(universal=x86_64) hangs.

Uninstalling  cleaning: ncursesw  ncurses doesn't improve, ncurses  
still hangs at executing run_tic.sh [2]



~Ceriel

[1]---
DESTDIR=/opt/local/var/macports/build/ 
_opt_local_var_macports_sources_rsync 
.macports.org_release_ports_devel_ncurses/work/destroot-x86_64 \

prefix=/opt/local \
exec_prefix=/opt/local \
bindir=/opt/local/bin \
top_srcdir=.. \
srcdir=. \
datadir=/opt/local/share \
ticdir=/opt/local/share/terminfo \
source=terminfo.tmp \
THIS_CC=/usr/bin/gcc-4.2 -m64 \
THAT_CC=/usr/bin/gcc-4.2 -m64 \
/bin/sh ./run_tic.sh
** Building terminfo database, please wait...
Running tic to install /opt/local/var/macports/build/ 
_opt_local_var_macports_sources_rsync 
.macports.org_release_ports_devel_ncurses/work/destroot-x86_64/opt/ 
local/share/terminfo ...


You may see messages regarding extended capabilities, e.g., AX.
These are extended terminal capabilities which are compiled
using
tic -x
If you have ncurses 4.2 applications, you should read the INSTALL
document, and install the terminfo without the -x option.
^C
[2]---
mkdir /opt/local/var/macports/build/ 
_opt_local_var_macports_sources_rsync 
.macports.org_release_ports_devel_ncurses/work/destroot-x86_64/opt/ 
local/share/tabset
DESTDIR=/opt/local/var/macports/build/ 
_opt_local_var_macports_sources_rsync 
.macports.org_release_ports_devel_ncurses/work/destroot-x86_64 \

prefix=/opt/local \
exec_prefix=/opt/local \
bindir=/opt/local/bin \
top_srcdir=.. \
srcdir=. \
datadir=/opt/local/share \
ticdir=/opt/local/share/terminfo \
source=terminfo.tmp \
THIS_CC=/usr/bin/gcc-4.0 -m64 \
THAT_CC=/usr/bin/gcc-4.0 -m64 \
/bin/sh ./run_tic.sh
** Building terminfo database, please wait...
Running tic to install /opt/local/var/macports/build/ 
_opt_local_var_macports_sources_rsync 
.macports.org_release_ports_devel_ncurses/work/destroot-x86_64/opt/ 
local/share/terminfo ...


You may see messages regarding extended capabilities, e.g., AX.
These are extended terminal capabilities which are compiled
using
tic -x
If you have ncurses 4.2 applications, you should read the INSTALL
document, and install the terminfo without the -x option.

___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: How to specify (default) compiler options and choose which compiler

2009-02-17 Thread Rainer Müller
Ceriel Jacobs wrote:
 Op 16 feb 2009, om 22:21 heeft Marcus Calhoun-Lopez het volgende  
 geschreven:
 WARNING:
 All of the things I am about to mention could very easily break
 a MacPorts installation and should not be implemented lightly.
 You can say that again.
 
 I was trying to build postgresql83 with this command:
 $ sudo /opt/local/bin/port -v install postgresql83 +universal  
 configure.compiler=gcc-4.2 configure.optflags=-fast configure.m64=yes  
 configure.march=nocona
 
 The process hung (overnight) at run_tic.sh [1] which was related to  
 ncurses dependancy, which is a dependancy of readline dependancy,  
 which is a postgresql83 dependancy.

See also ticket #17295 [1].
There seems to be a problem with 64 bit and ncurses.

Rainer

[1] http://trac.macports.org/ticket/17295
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


How to specify (default) compiler options and choose which compiler

2009-02-16 Thread Ceriel Jacobs
My goal is to build speed optimised binaries for 10.5 Core2Duo: -fast - 
march=nocona (-m64).


The -march=nocona requires gcc 4.2 or higher.
The default on MacOS is still gcc 4.0.
I know I can use ./port ... configure.compiler=gcc-4.2

Questions:
- how to specify gcc 4.2 *by default* within MacPorts?
- how to verify that binaries are actually build using gcc 4.2?

I am already using the +universal trick to specify default x86_64  
instead of the default i386/ppc.


Now I read macports documentation regarding setting compiler flags:  
configure.cflags defaults to -O2.


Questions:
- which configuration file should be modified to change the default - 
O2 to -fast?
- in case that is not possible, and it should be appended to the port  
command, how is that best done?

a. configure.cflags=-fast
or
b. configure.cflags-delete=-O2 configure.cflags-append=-fast (and for  
configure.ccflags-delete=-O2 configure.cxxflags-delete=-O2)


~Ceriel
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: How to specify (default) compiler options and choose which compiler

2009-02-16 Thread Marcus Calhoun-Lopez
Ceriel Jacobs cerieljacobs at gmail.com writes:

 
 My goal is to build speed optimised binaries for 10.5 Core2Duo: -fast - 
 march=nocona (-m64).
 
 The -march=nocona requires gcc 4.2 or higher.
 The default on MacOS is still gcc 4.0.
 I know I can use ./port ... configure.compiler=gcc-4.2
 
 Questions:
 - how to specify gcc 4.2 *by default* within MacPorts?

WARNING:
All of the things I am about to mention could very easily break
a MacPorts installation and should not be implemented lightly.

As far as I know, there is no configuration file in which these
values can be changed.

You could write a shell script which overrides the default values
port install $1
configure.compiler=gcc-4.2
configure.optflags=-fast
configure.m64=yes
configure.march=nocona

You can also edit the file
${prefix}/share/macports/Tcl/port1.0/portconfigure.tcl

These two actions only set the default value.
A Portfile can override your value as well.
In that case you would have to create your own local repository
(http://guide.macports.org/#development.local-repositories).

 - how to verify that binaries are actually build using gcc 4.2?
The only way I know of is to use verbose output and see if any other compiler is
being used.

-Marcus



___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


Re: How to specify (default) compiler options and choose which compiler

2009-02-16 Thread Rainer Müller
Marcus Calhoun-Lopez wrote:
 You could write a shell script which overrides the default values
 port install $1
 configure.compiler=gcc-4.2
 configure.optflags=-fast
 configure.m64=yes
 configure.march=nocona
 
 You can also edit the file
 ${prefix}/share/macports/Tcl/port1.0/portconfigure.tcl
 
 These two actions only set the default value.
 A Portfile can override your value as well.

No, command line options override values given in the Portfile.
configure.compiler can currently only be set to a different default by
editing portconfigure.tcl.

Rainer
___
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users