1b633
![]() |
|
|
|
|
|||||||
| Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
This is my first post in FreeBSD community and note that i'm a new BSD user since yesterday. My first goal is to use FreeBSD for my desktop and optimize as the best as I can. I have made some change in make.conf to build ports using gcc46 to benefit the best compilation time. But, on a couple of them I get some undefined error when building the ports. I have made some test and research and finally I can confirm that the problem is cause by gcc46. here is my make.conf Code:
# =============================================================================
# DEFINITION DU TYPE DE PROCESSEUR POUR L'OPTIMISATION DE LA COMPILATION
# =============================================================================
CPUTYPE?= athlon64
# =============================================================================
# DEFINITION DU TYPE DE PROCESSEUR POUR L'OPTIMISATION DE LA COMPILATION
# =============================================================================
CFLAGS= -O2 -fno-strict-aliasing -pipe
CXXFLAGS+= -fconserve-space
MAKE_JOBS_NUMBER= 6
# =============================================================================
# DEFINITION DU TYPE DE PROCESSEUR POUR L'OPTIMISATION DE LA COMPILATION
# =============================================================================
MAKE_SHELL?= sh
# =============================================================================
# OPTION DE COMPILATION POUR LE KERNEL
# =============================================================================
KERNCONF= MYKERNEL GENERIC
COPTFLAGS= -O -pipe
# =============================================================================
# OPTION DE COMPILATION POUR LANGUAGE ET ENCODAGE A COMPILER
# =============================================================================
DOC_LANG= fr_CA.ISO8859-1 fr_CA.UTF-8 en_US.ISO8859-1 en_US.UTF-8
# =============================================================================
# UTILISATION DE CCACHE
# =============================================================================
.if !defined(NO_CACHE)
CC= /usr/local/libexec/ccache/world-cc
CCX= /usr/local/libexec/ccache/world-c++
.endif
.if ${.CURDIR:M*/ports/devel/ccache}
NO_CCACHE= yes
.endif
# =============================================================================
# UTILISATION DE PERL
# =============================================================================
PERL_VERSION=5.10.1
# =============================================================================
# UTILISATION DE GCC 4.6
# =============================================================================
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc46)
CC=gcc46
CXX=g++46
CPP=cpp46
CFLAGS+=-mssse3
.endif
When I get the error, I need to editing the make.conf and comment these lines, restart the build and after that I can build it successfully. Code:
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc46) #CC=gcc46 #CXX=g++46 #CPP=cpp46 #CFLAGS+=-mssse3 .endif Thanks and Regards Last edited by DutchDaemon; January 4th, 2011 at 18:04. Reason: proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#2
|
||||
|
||||
|
Stop "optimizing", this isn't Gentoo. Remove all CFLAGS (and variants) from /etc/make.conf, and use the system compilers.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#3
|
||||
|
||||
|
If you're sure it's not a compiler bug, i.e. reproducible on latest stable branch of gcc (gcc45), then you can try to document it via GNATS. But make sure that you don't do smth funny with CFLAGS. While ports are not guaranteed to work with any non-base compiler someone may offer you a fix. For example, www/firefox used to fail build in the past, now it builds fine thanks to bf.
OTOH, there is ongoing effort to make ports build with clang. This may or may not help build failures with lang/gcc*. |
| The Following User Says Thank You to dandelion For This Useful Post: | ||
morpho (January 4th, 2011) | ||
|
#4
|
|||
|
|||
|
Thanks Dandelion for your great reply. Sorry Dutch, but i'm not agreed with your post. Optimizing can be a good way to learn. Otherwise, we never can be better... Another question, about stable branch: How I can know which port are consider in stable branch.
Thanks and regards |
|
#5
|
||||
|
||||
|
"Optimizing" with gcc options does not always result in improvements, and even when it does they may not be measurable. Besides that, ports which can use gcc optimizations generally handle that already, and overriding it in /etc/make.conf makes things worse, not better.
If you're interested in learning by breaking things, I've been compiling a list: Code:
Do change root's shell to bash. Do use chmod 777 on lots of things. Do set CFLAGS to heavily optimized values. Do enable root login for ssh. Do enable telnet. Do use sysinstall to edit system settings. Do install applications from bare source. Do edit /etc/defaults/rc.conf and /boot/defaults/loader.conf. |
|
#6
|
|||
|
|||
|
I think you are totally wrong wblock
please refer to http://www.freebsd.org/doc/en_US.ISO...c/article.html you will find this part: 4 Impact on the binary performance Using GCC version 4.4 with SSSE3 instruction set enabled (if supported by the CPU) may yield up to 10% average increase in binary performance. In certain tests, the results show more than a 20% performance boost (e.g. in multimedia processing). As I know, i was on the freebsd website. Improving performance on binary for more than 10%, I suppose that could be great for a desktop... NO ?! Quote:
|
|
#7
|
||||
|
||||
|
Morpho, by all means: shoot yourself in the foot all day long. Just don't expect to find accomplices here. The advice is: leave the system, flags and compilers well alone, don't try to outsmart the hundreds of committers and ports maintainers who know infinitely more about this operating system's optimizations and internal logic than you do. FreeBSD advances on its own time schedule and on its own terms.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#8
|
|||
|
|||
|
Thanks for your answer Dutch. I understand that applying what this article explain can cause problem.
Quote:
For now, I only want to use port on all software I need. I want to build my system for my CPU specifc and if this possible improve performance on binary without always need to tune something to do the work. Does this is possible in FreeBSD ? Thanks and Regards |
|
#9
|
||||
|
||||
|
Define CPUTYPE?= in /etc/make.conf. That's all you'll ever need to do to optimize for your CPU. See /usr/share/examples/etc/make.conf for allowed types. I see you have athlon64, so that should be fine. All other flags and settings should be removed.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#10
|
|||
|
|||
|
Great ! I will do this ! If you remark, I'm using CCACHE and I suppose that could not break the build but simply improve the compilation time. Is this right ?
|
|
#11
|
||||
|
||||
|
You'll find quite a few CCACHE users here (for ports and base system), and this should generally speed things up. Search the forums for possible pitfalls.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
|
#12
|
||||
|
||||
|
That's unusual, usually I'm just mostly wrong.
Quote:
Quote:
Consider a more cautious approach. Install the system, get it working, become familiar with it, then optimize things that aren't fast enough. |
|
#13
|
|||
|
|||
|
Hi wblock,
I understand your approach and I will try to apply it on my desktop. At my point of vue, I have learn on how to manage ports today. I think this is a good way to learn because that's the first time I use the ports system. Before, I only have to do apt-get install xxx or pacman -S xxx or ./configure && make install clean to install some software. Today I want to build all from ports and .. you're right, I have broke my system. The only thing that put me frustated is about this post ... Quote:
Thanks for your help and sorry for the inconvenience. Regards |
|
#14
|
||||
|
||||
|
I apologize for that. It was supposed to be a funny list of things we see done regularly that turn out to be really memorable mistakes. It's more of an in-joke, and not that funny anyway. I'm sorry, and hope it hasn't given a bad impression of the forums. Everybody else here is actually pretty nice.
|
|
#15
|
||||
|
||||
|
But we're in the process of removing them
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki Before you post: How to ask questions the smart way If you must know .. So, what does an Adminstrator/Moderator do? ---> Do not PM me with FreeBSD questions. I do not work here. <--- |
![]() |
| Tags |
| gcc46, gcc; port build error |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] php5-imap-5.3.3 from port: build errors | jotawski | Installation and Maintenance of FreeBSD Ports or Packages | 6 | August 3rd, 2010 23:22 |
| audio/lmms port build error | goshanecr | Installation and Maintenance of FreeBSD Ports or Packages | 0 | December 28th, 2009 22:20 |
| Limit CPU and other resources while port build | surlyjake | Installation and Maintenance of FreeBSD Ports or Packages | 7 | June 4th, 2009 00:38 |
| Where did the free space go after failed port build | jwhendy | Installation and Maintenance of FreeBSD Ports or Packages | 23 | May 7th, 2009 08:40 |
| What if a port does not use build systems supported by ports | Kitche | Porting New Software | 7 | November 23rd, 2008 20:43 |