aee2 building ports with gcc46 under 8-STABLE (for the fun) - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages

Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Reply
 
Thread Tools Display Modes
  #1  
Old August 13th, 2011, 11:03
tobe's Avatar
tobe tobe is offline
Junior Member
 
Join Date: Jan 2009
Location: Europe.France.Lyon
Posts: 92
Thanks: 21
Thanked 8 Times in 8 Posts
Default building ports with gcc46 under 8-STABLE (for the fun)

Hello,

I have to stay home today just in case my employer calls me for assistance, so i decided to mess around with FreeBSD ports on my laptop

I've installed gcc46 (as described in the handbook, but for gcc44) and tried to recompile all ports.

I known this is not a good idea, but remember i'm just playing with my computer to kill time and probably most of the softwares i've installed so far.

I got some problems with the stack protector flag (now enabled by default), lots of ports failed to build with the following error :

Code:
undefined reference to `__stack_chk_fail_local'
So i decided to remove it (...) by adding the line "SSP_CFLAGS=" in /etc/make.conf, only for ports.

Seems like it's building fine now, but i have a couple of questions :

Is this a known problem ?
Is SSP_CFLAGS= the "right way", if any, to disable stack protection ?
Or, is there any way to keep stack protection and build with gcc46 ?
__________________
1: Introduce bug; 2: Fix bug; 3: Goto 1
Reply With Quote
  #2  
Old August 13th, 2011, 11:46
poh-poh's Avatar
poh-poh poh-poh is offline
Junior Member
 
Join Date: Apr 2011
Posts: 39
Thanks: 0
Thanked 17 Times in 15 Posts
Default

Try to place gcc46 libs before basegcc libs in rtld(1) hints which also affect ld(1) that's likely link against wrong libssp (another example is ports/148196), e.g.
Code:
Index: etc/rc.d/ldconfig
===================================================================
--- etc/rc.d/ldconfig	(revision 224789)
+++ etc/rc.d/ldconfig	(working copy)
@@ -22,7 +22,7 @@
 	ldconfig=${ldconfig_command}
 	checkyesno ldconfig_insecure && _ins="-i"
 	if [ -x "${ldconfig_command}" ]; then
-		_LDC="/lib /usr/lib"
+		_LDC="/usr/local/lib/gcc46 /lib /usr/lib"
 		for i in ${ldconfig_local_dirs}; do
 			if [ -d "${i}" ]; then
 				_files=`find ${i} -type f`

Last edited by poh-poh; August 13th, 2011 at 11:52.
Reply With Quote
The Following User Says Thank You to poh-poh For This Useful Post:
tobe (August 13th, 2011)
  #3  
Old August 13th, 2011, 13:09
tobe's Avatar
tobe tobe is offline
Junior Member
 
Join Date: Jan 2009
Location: Europe.France.Lyon
Posts: 92
Thanks: 21
Thanked 8 Times in 8 Posts
Default

Thanks for the suggestion, and for pointing me the PR, but i'd prefer something i could configure conditionally like it's done in /etc/make.conf.

I'll take a look at the -rpath option later, i'm now rebuilding all ports and i don't want to stop it right now
__________________
1: Introduce bug; 2: Fix bug; 3: Goto 1
Reply With Quote
Reply

Tags
gcc46, ports

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building and distributing packages from ports minimike Installation and Maintenance of FreeBSD Ports or Packages 3 July 22nd, 2011 07:25
[Solved] Security of building from ports chavez243ca Installation and Maintenance of FreeBSD Ports or Packages 5 December 3rd, 2010 11:57
Problem building kde4 from ports penna Installation and Maintenance of FreeBSD Ports or Packages 0 August 22nd, 2010 02:05
[Solved] building new kernel question.. (FreeBSD 8 stable) osx-addict Installing & Upgrading 10 March 24th, 2010 23:33
building MySQL from ports faill SIFE Installation and Maintenance of FreeBSD Ports or Packages 7 August 20th, 2009 09:34


All times are GMT +1. The time now is 21:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0