List of ports that don't build perfectly (or at all) with gcc44

I've recently used the method described here to install and use gcc44 for building ports with ssse3

http://www.freebsd.org/doc/en/articles/custom-gcc/article.html

I couldn't find a list of ports which don't build properly with gcc44 so i figured i'd help start one. If anyone finds more ports with this issue, or has patches and tips on how to make them build, let's post them here.



Doesn't build:

misc/getopt
www/libxul
security/py-crypto
this port will not build if you used the mssse3 cflag in lang/python26
devel/icu
sysutils/fusefs-kmod
graphics/libGL
www/firefox35
net/liveMedia

Builds, but doesn't work properly:

net-p2p/rtorrent
net-p2p/libtorrent
net-p2p/rtorrent-devel
net-p2p/libtorrent-devel
doesn't build, but has a fix:

sysutils/libcdio ( add
Code:
#include <stdlib.h>
to include/cdio++/iso9660.hpp between
Code:
#include <cdio++/cdio.hpp>
+#include <stdlib.h>
 #include <string.h>

ports/security/py-openssl
This port will not build with -mssse flag

sysutils/fusefs-kmod
put this in your make.conf:
Code:
.if empty(.CURDIR:M/usr/ports/sysutils/fusefs-kmod)
CWARNFLAGS := ${CWARNFLAGS:N-fformat-extensions}
.endif

devel/icu
this requires an edit of the file /usr/ports/devel/icu/work/icu/source/layoutex/ParagraphLayout.cpp replace #elif with #else then it should build


if anyone has any to add, or any corrections or tips please let me know.
I'll keep adding stuff i find.
 
maybe someone knows how to handle this....
the page i referenced before explains how to exclude a port entirely but how would you just exclude the cflag? adding this doesn't work

Code:
.if !empty(.CURDIR:M/usr/ports/security/py-openssl*) && exists(/usr/local/bin/gcc44)
CC=gcc44
CXX=g++44
CPP=cpp44
.endif

if you already have the other section....any ideas?


ok, this is quite annoying....the port security/py-pycrypto won't build now no matter what i do....i'm not sure what to do to fix this.

if anyone knows let me know, heres the error code
Code:
===>  Building for py26-pycrypto-2.0.1_4
running build
running build_py
running build_ext
building 'Crypto.Hash.MD2' extension
cc -DNDEBUG -O2 -pipe -mssse3 -march=prescott -D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x100000 -fno-strict-aliasing -O2 -pipe -march=prescott 
-fno-strict-aliasing -fPIC -Isrc/ -I/usr/local/include/python2.6 -c src/MD2.c -o build/temp.freebsd-8.0-RC1-i386-2.6/src/MD2.o
cc1: error: unrecognized command line option "-mssse3"
error: command 'cc' failed with exit status 1
*** Error code 1

and i've already removed the -mssse3 cflag from /etc/make.conf and even tried the default compiler.


edit:

I ended up having to remove python and rebuild it without the mssse3 flag.

If anyone knows a method to patch py-crypto to make it ignore this flag, that would probably be better...i'm not up to that level of skill yet.
 
wonslung said:
ports/security/py-openssl
This port will not build with -mssse flag
either
Code:
.for port in py-openssl portfoo net-p2p/portbar
. if ${.CURDIR:M*/${port}}
   BLAH =
. endif
.endfor

.ifndef BLAH
  CFLAGS += -mssse3
.endif
or
Code:
.for port in py-openssl net/portfoo portbar
. if ${.CURDIR:M*/${port}}
   CFLAGS := ${CFLAGS:N-mssse3}
. endif
.endfor
However, you don't need to explicitly enable SSE extensions on gcc44. Just set -march=native and forget about them.$ gcc44 -Q -march=native --help=target | fgrep sss
-mssse3 [enabled]

$ gcc44 -dM -E -march=native - </dev/null | fgrep -i sss
#define __SSSE3__ 1

$ gcc44 -E -v -march=native - </dev/null |& fgrep cc1
/usr/.../4.4.2/cc1 -E -quiet -v - -march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=core2


You can do similar thing if you have several compilers installed
Code:
.for port in recode sdl12 libmad
. if ${.CURDIR:M*/${port}}
   CC =  gcc42
. endif
.endfor

.for port in nmap rtorrent* boost-libs wesnoth-devel
. if ${.CURDIR:M*/${port}}
   CXX = g++43
. endif
.endfor
You can compress this code further by writing some macro like it's done in /usr/share/mk/.

FYI, on gcc44 you can try to use -ftree-loop-distribution, -ftree-parallelize-loops or even graphite.
 
so set CPUTYPE = native and it will use all the best compiler based cpu stuff?

Does rtorrent-devel work with gcc43 or something? Thanks, i'm very new to this part of building ports (i've always used default until i read the doc i linked in my first post)

do you have any /etc/make.conf files you could share with me regarding this?

thanks.
 
Here are my results:

misc/getopt doesn't support CFLAGS+=-mssse3 with gcc44

devel/icu doesn't compil:

Code:
generating dependency information for ParagraphLayout.cpp
ParagraphLayout.cpp:816:6: error: #elif with no expression
gmake[1]: quittant le répertoire « /usr/ports/devel/icu/work/icu/source/layoutex »
gmake[1]: entrant dans le répertoire « /usr/ports/devel/icu/work/icu/source/layoutex »
generating dependency information for ParagraphLayout.cpp
ParagraphLayout.cpp:816:6: error: #elif with no expression
g++44  -I. -I./unicode -I./.. -I../common   -DU_LAYOUTEX_IMPLEMENTATION -pipe -mssse3 -g  -fvisibility=hidden -c   -o ParagraphLayout.ao 
ParagraphLayout.cpp
ParagraphLayout.cpp:816:6: error: #elif with no expression
gmake[1]: *** [ParagraphLayout.ao] Erreur 1
gmake[1]: quittant le répertoire « /usr/ports/devel/icu/work/icu/source/layoutex »
gmake: *** [all-recursive] Erreur 2
*** Error code 1

Stop in /usr/ports/devel/icu.
*** Error code 1

Stop in /usr/ports/devel/icu.

sysutils/fusefs-kmod doesn't compil:

Code:
gcc44 -pipe -mssse3 -g -mssse3 -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param 
inline-unit-growth=100 --param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 
-mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector 
-std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith 
-Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_main.c
cc1: error: unrecognized command line option "-fformat-extensions"
*** Error code 1

Stop in /usr/ports/sysutils/fusefs-kmod/work/fuse4bsd-498acaef33b0/fuse_module.
*** Error code 1

graphics/libGL doesn't compil:

Code:
mklib: Making FreeBSD shared library:  libGL.so.1
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: ../../../src/mesa/x86-64
/glapi_x86-64.o: relocation R_X86_64_PC32 against symbol `_gl_DispatchTSD' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: 'edition de lien finale en 'echec: 
Mauvaise valeur
collect2: ld returned 1 exit status
mklib: Installing libGL.so.1 libGL.so in ../../../lib
mv: rename libGL.so.1 to ../../../lib/libGL.so.1: No such file or directory
gmake[2]: *** [../../../lib/libGL.so] Erreur 1
gmake[2]: quittant le répertoire « /usr/ports/graphics/libGL/work/Mesa-7.4.4/src/glx/x11 »
gmake[1]: *** [subdirs] Erreur 1
gmake[1]: quittant le répertoire « /usr/ports/graphics/libGL/work/Mesa-7.4.4/src »
gmake: *** [default] Erreur 1

Then, here is my /etc/make.conf :

Code:
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc44)
.if empty(.CURDIR:M/usr/ports/devel/icu*) && empty(.CURDIR:M/usr/ports/sysutils/fusefs-kmod*) && empty(.CURDIR:M/usr/ports/graphics/libGL)
CC=gcc44
CXX=g++44
CPP=cpp44
.if empty(.CURDIR:M/usr/ports/misc/getopt) 
CFLAGS+=-mssse3
.endif
.endif
.endif
 
wonslung said:
so set CPUTYPE = native and it will use all the best compiler based cpu stuff?
Yep. Don't use core2 with gcc44 because <bsd.cpu.mk> will override it with nocona/prescott. Well, I consider that file evil and have removed some overly "smart" parts inside it.
wonslung said:
Does rtorrent-devel work with gcc43 or something?
Find out it yourself. The app will either not compile or easily crash if you pick the wrong compiler. Sometimes it takes time to notice misbehavior e.g., in case devel/sdl12.
wonslung said:
do you have any /etc/make.conf files you could share with me regarding this?
No, my make.conf is quite messy and other than lists for gcc4{2,3,4} (assumes `cc' == `gcc45') contains much ad hoc stuff like
- disable `-combine' for clang and replace `native' with `core2'
- enable -ggdb (*.symbols) for ports with kernel modules
- use MAKE_JOBS_UNSAFE for some non-marked ports
Some hacks are scattered across ports tree because it's impossible to do some things from make.conf e.g., add --enable-sse2 option to CONFIGURE_ARGS because make.conf is read before Makefile.
[cmd="rtorrent-devel $"]make -V .MAKEFILE_LIST
/usr/share/mk/sys.mk /etc/make.conf .. /usr/share/mk/bsd.compat.mk .. /usr/share/mk/bsd.cpu.mk .. .. Makefile...[/cmd]

FWIW, by using compiler from ports you might stumble upon some ports that assume GCC in FreeBSD doesn't search /usr/local/include by default e.g., ports/132579, ports/136917.
 
well, i understood SOME of that =)

When i build rtorrent-devel with gcc44 it would core dump every time i tried to connect via scgi

rebuilding it with the default compiler didn't solve the issue...i don't know WHAT happened, i even tried rebuild ALL ports but i still ended up with an rtorrent that didn't work. It was highly highly stupid of me to build it outside of a jail...but live and learn. i only asked because i thought you may know, you mentioned it earlier but now i realize you were just using MY example.

what do you mean by the last statement?

As you can tell, i'm fairly new to THIS part of port building. I am loving it...i've done a lot of googing but there is surprisingly little info on using other compilers
 
olivier said:
misc/getopt doesn't support CFLAGS+=-mssse3 with gcc44
As I said earlier you do not need to set machine specific CFLAGS for gcc44 and gcc45, -march= will do this for you.
olivier said:
Code:
generating dependency information for ParagraphLayout.cpp
ParagraphLayout.cpp:816:6: error: #elif with no expression
gmake[1]: quittant le répertoire « /usr/ports/devel/icu/work/icu/source/layoutex »
gmake[1]: entrant dans le répertoire « /usr/ports/devel/icu/work/icu/source/layoutex »
generating dependency information for ParagraphLayout.cpp
ParagraphLayout.cpp:816:6: error: #elif with no expression
g++44  -I. -I./unicode -I./.. -I../common   -DU_LAYOUTEX_IMPLEMENTATION -pipe -mssse3 -g  -fvisibility=hidden -c   -o ParagraphLayout.ao 
ParagraphLayout.cpp
ParagraphLayout.cpp:816:6: error: #elif with no expression
gmake[1]: *** [ParagraphLayout.ao] Erreur 1
gmake[1]: quittant le répertoire « /usr/ports/devel/icu/work/icu/source/layoutex »
gmake: *** [all-recursive] Erreur 2
*** Error code 1
I think replacing offending #elif's with #else should fix it.
olivier said:
Code:
gcc44 -pipe -mssse3 -g 
-mssse3 -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 
--param large-function-growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 
-mno-sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-
protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef 
-Wno-pointer-sign -fformat-extensions -c fuse_main.c
cc1: error: unrecognized command line option "-fformat-extensions"
*** Error code 1
Try to put smth like this in make.conf
Code:
.if ${CC:Mgcc44}
  CWARNFLAGS := ${CWARNFLAGS:N-fformat-extensions}
.endif
 
Thanks a lot's Jhon_Doe!

devel/icu fix for gcc44:

Editing file: /usr/ports/devel/icu/work/icu/source/layoutex/ParagraphLayout.cpp
and replacing the #elif by a #else fix the problem.

sysutils/fusefs-kmod fix for gcc44 using this /etc/make.conf:
Code:
.if empty(.CURDIR:M/usr/ports/sysutils/fusefs-kmod)
CWARNFLAGS := ${CWARNFLAGS:N-fformat-extensions}
.endif

www/firefox35 doesn't compil:

Code:
/usr/ports/www/firefox35/work/mozilla-1.9.1/js/src/jsnum.cpp:765: référence indéfinie vers << fedisableexcept >>
jsnum.o: dans la fonction << js_InitRuntimeNumberState >>:
/usr/ports/www/firefox35/work/mozilla-1.9.1/js/src/jsnum.cpp:687: référence indéfinie vers << fedisableexcept >>
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: libmozjs.so: hidden symbol 
`fedisableexcept' isn't defined
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: 'edition de lien finale en 'echec: 
Section non-représentable pour la sortie
jsnum.o: dans la fonction << js_InitNumberClass >>:
/usr/ports/www/firefox35/work/mozilla-1.9.1/js/src/jsnum.cpp:765: référence ind'efinie vers << fedisableexcept >>
jsnum.o: dans la fonction << js_InitRuntimeNumberState >>:
/usr/ports/www/firefox35/work/mozilla-1.9.1/js/src/jsnum.cpp:687: référence ind'efinie vers << fedisableexcept >>
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: js: hidden symbol `fedisableexcept' 
isn't defined
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: 'edition de lien finale en 'echec: 
Section non-représentable pour la sortie
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
gmake[3]: *** [libmozjs.so] Erreur 1
gmake[3]: *** Attente des tâches non terminées....
gmake[3]: *** [js] Erreur 1
gmake[3]: quittant le répertoire « /usr/ports/www/firefox35/work/mozilla-1.9.1/js/src »
gmake[2]: *** [libs_tier_js] Erreur 2
gmake[2]: quittant le répertoire « /usr/ports/www/firefox35/work/mozilla-1.9.1 »
gmake[1]: *** [tier_js] Erreur 2
gmake[1]: quittant le répertoire « /usr/ports/www/firefox35/work/mozilla-1.9.1 »
gmake: *** [default] Erreur 2
*** Error code 1

net/liveMedia doesn't compil

Code:
Media.cpp:21:20: error: Media.hh: No such file or directory
Media.cpp:22:24: error: HashTable.hh: No such file or directory
MediaSource.cpp:21:26: error: MediaSource.hh: No such file or directory
MediaSource.cpp:25: error: 'MediaSource' has not been declared
MediaSource.cpp:25: error: expected constructor, destructor, or type conversion before '(' token
MediaSource.cpp:29: error: expected constructor, destructor, or type conversion before '::' token
MediaSource.cpp:32: error: 'Boolean' does not name a type
MediaSource.cpp:36: error: 'MediaSource' has not been declared
MediaSource.cpp:36: error: non-member function 'const char* MIMEtype()' cannot have cv-qualifier
MediaSource.cpp:40: error: 'Boolean' does not name a type
MediaSource.cpp:43: error: 'Boolean' does not name a type
MediaSource.cpp:46: error: 'Boolean' does not name a type
MediaSource.cpp:49: error: 'Boolean' does not name a type
MediaSource.cpp:52: error: 'Boolean' does not name a type
MediaSource.cpp:55: error: 'Boolean' does not name a type
MediaSource.cpp:58: error: 'Boolean' does not name a type
MediaSource.cpp:61: error: 'Boolean' does not name a type
MediaSource.cpp:65: error: 'Boolean' does not name a type
MediaSource.cpp:82: error: 'MediaSource' has not been declared
MediaSource.cpp:82: error: non-member function 'void getAttributes()' cannot have cv-qualifier
MediaSource.cpp: In function 'void getAttributes()':
MediaSource.cpp:84: error: 'envir' was not declared in this scope
Media.cpp:27: error: expected ';' before '(' token
Media.cpp:29: error: ISO C++ forbids declaration of 'Medium' with no type
Media.cpp:29: error: expected ';' before '*' token
Media.cpp:32: error: 'Medium' has not been declared
Media.cpp:38: error: expected ')' before '&' token
Media.cpp:42: error: ISO C++ forbids declaration of 'UsageEnvironment' with no type
Media.cpp:42: error: expected ';' before '&' token
Media.cpp:43: error: ISO C++ forbids declaration of 'HashTable' with no type
Media.cpp:43: error: expected ';' before '*' token
*** Error code 1
Media.cpp:50: error: 'Medium' has not been declared
Media.cpp:50: error: expected constructor, destructor, or type conversion before '(' token
Media.cpp:60: error: expected constructor, destructor, or type conversion before '::' token
Media.cpp:65: error: 'Boolean' does not name a type
Media.cpp:76: error: 'Medium' has not been declared
Media.cpp:76: error: variable or field 'close' declared void
Media.cpp:76: error: 'UsageEnvironment' was not declared in this scope
Media.cpp:76: error: 'env' was not declared in this scope
Media.cpp:76: error: expected primary-expression before 'char'
Media.cpp:80: error: 'Medium' has not been declared
Media.cpp:80: error: variable or field 'close' declared void
Media.cpp:80: error: 'Medium' was not declared in this scope
Media.cpp:80: error: 'medium' was not declared in this scope
Media.cpp:86: error: 'Boolean' does not name a type
Media.cpp:90: error: 'Boolean' does not name a type
Media.cpp:94: error: 'Boolean' does not name a type
Media.cpp:98: error: 'Boolean' does not name a type
Media.cpp:102: error: 'Boolean' does not name a type
Media.cpp:106: error: 'Boolean' does not name a type
Media.cpp:110: error: 'Boolean' does not name a type
Media.cpp:114: error: 'Boolean' does not name a type
Media.cpp:121: error: expected constructor, destructor, or type conversion before '*' token
*** Error code 1
2 errors
*** Error code 2
1 error
*** Error code 1

Now, following your advice, I've changed my /etc/make.conf:
Code:
CPUTYPE?=native
.if !empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc44)
.if empty(.CURDIR:M/usr/ports/graphics/libGL) && empty(.CURDIR:M/usr/ports/www/firefox35) && empty(.CURDIR:M/usr/ports/net/liveMedia*)
CC=gcc44
CXX=g++44
CPP=cpp44
.if empty(.CURDIR:M/usr/ports/misc/getopt)
CFLAGS+=-mssse3
.endif
.if empty(.CURDIR:M/usr/ports/sysutils/fusefs-kmod)
CWARNFLAGS := ${CWARNFLAGS:N-fformat-extensions}
.endif
.endif
.endif
 
olivier said:
Thanks a lot's Jhon_Doe!

i added all this to the first post, thanks bro. i hope if we keep doing this we might get a very nice list to help people.

Also, if anyone finds a way to make the ones in thee "wont build" category to build, let us know.
 
I got into problems with the following ports and gcc44

audio/libmad
multimedia/gstreamer-ffmpeg
multimedia/libdvdread
x11/nvidia-driver

nvidia-driver uses -mno-align-long-strings and -fformat-extensions
 
olivier said:
net/liveMedia doesn't compil

Code:
Media.cpp:21:20: error: Media.hh: No such file or directory
Media.cpp:22:24: error: HashTable.hh: No such file or directory
MediaSource.cpp:21:26: error: MediaSource.hh: No such file or directory
MediaSource.cpp:25: error: 'MediaSource' has not been declared
MediaSource.cpp:25: error: expected constructor, destructor, or type conversion before '(' token
MediaSource.cpp:29: error: expected constructor, destructor, or type conversion before '::' token
MediaSource.cpp:32: error: 'Boolean' does not name a type
MediaSource.cpp:36: error: 'MediaSource' has not been declared
MediaSource.cpp:36: error: non-member function 'const char* MIMEtype()' cannot have cv-qualifier
MediaSource.cpp:40: error: 'Boolean' does not name a type
MediaSource.cpp:43: error: 'Boolean' does not name a type
MediaSource.cpp:46: error: 'Boolean' does not name a type
MediaSource.cpp:49: error: 'Boolean' does not name a type
MediaSource.cpp:52: error: 'Boolean' does not name a type
MediaSource.cpp:55: error: 'Boolean' does not name a type
MediaSource.cpp:58: error: 'Boolean' does not name a type
MediaSource.cpp:61: error: 'Boolean' does not name a type
MediaSource.cpp:65: error: 'Boolean' does not name a type
MediaSource.cpp:82: error: 'MediaSource' has not been declared
MediaSource.cpp:82: error: non-member function 'void getAttributes()' cannot have cv-qualifier
MediaSource.cpp: In function 'void getAttributes()':
MediaSource.cpp:84: error: 'envir' was not declared in this scope
Media.cpp:27: error: expected ';' before '(' token
Media.cpp:29: error: ISO C++ forbids declaration of 'Medium' with no type
Media.cpp:29: error: expected ';' before '*' token
Media.cpp:32: error: 'Medium' has not been declared
Media.cpp:38: error: expected ')' before '&' token
Media.cpp:42: error: ISO C++ forbids declaration of 'UsageEnvironment' with no type
Media.cpp:42: error: expected ';' before '&' token
Media.cpp:43: error: ISO C++ forbids declaration of 'HashTable' with no type
Media.cpp:43: error: expected ';' before '*' token
*** Error code 1
Media.cpp:50: error: 'Medium' has not been declared
Media.cpp:50: error: expected constructor, destructor, or type conversion before '(' token
Media.cpp:60: error: expected constructor, destructor, or type conversion before '::' token
Media.cpp:65: error: 'Boolean' does not name a type
Media.cpp:76: error: 'Medium' has not been declared
Media.cpp:76: error: variable or field 'close' declared void
Media.cpp:76: error: 'UsageEnvironment' was not declared in this scope
Media.cpp:76: error: 'env' was not declared in this scope
Media.cpp:76: error: expected primary-expression before 'char'
Media.cpp:80: error: 'Medium' has not been declared
Media.cpp:80: error: variable or field 'close' declared void
Media.cpp:80: error: 'Medium' was not declared in this scope
Media.cpp:80: error: 'medium' was not declared in this scope
Media.cpp:86: error: 'Boolean' does not name a type
Media.cpp:90: error: 'Boolean' does not name a type
Media.cpp:94: error: 'Boolean' does not name a type
Media.cpp:98: error: 'Boolean' does not name a type
Media.cpp:102: error: 'Boolean' does not name a type
Media.cpp:106: error: 'Boolean' does not name a type
Media.cpp:110: error: 'Boolean' does not name a type
Media.cpp:114: error: 'Boolean' does not name a type
Media.cpp:121: error: expected constructor, destructor, or type conversion before '*' token
*** Error code 1
2 errors
*** Error code 2
1 error
*** Error code 1
The port doesn't like CPP in your make.conf. I use symlinks, not sure how to fix it otherwise. You can do same as me, i.e.
  1. make these symlinks in $HOME/bin:
    • cc -> /usr/local/bin/gcc44
    • gcc -> /usr/local/bin/gcc44
    • cpp -> /usr/local/bin/cpp44
    • c++ -> /usr/local/bin/g++44
    • g++ -> /usr/local/bin/g++44
    • gcov -> /usr/local/bin/gcov44 (optional)
    • basegcc -> /usr/bin/gcc
    • baseg++ -> /usr/bin/g++
  2. add [cmd=]EXTRA_COMPILERS=basegcc baseg++[/cmd] into make.conf and reinstall devel/ccache
  3. add [cmd=]PATH=/usr/local/libexec/ccache:$HOME/bin:$PATH[/cmd] to ~/.profile
  4. define excludes that should use basgcc/baseg++ in make.conf, e.g. /usr/src and some failing ports
olivier said:
CFLAGS+=-mssse3
I advised against doing so. [cmd=]-march=native[/cmd] detects and enables it when it's supported.
 
thuglife said:
audio/libmad
[cmd=]-fforce-mem[/cmd] is nop on gcc42
$ /usr/bin/gcc -fforce-mem - -E
cc1: warning: -f[no-]force-mem is nop and option will be removed in 4.3

You can safely remove it from ${WRKSRC}/configure.
thuglife said:
multimedia/libdvdread
builds fine here using slightly old gcc44 (20091006) and gcc45 (20091001). Can you show error message?
 
wonslung said:
devel/icu
this requires an edit of the file /usr/ports/devel/icu/work/icu/source/layoutex/ParagraphLayout.cpp replace #elif with #else then it should build
Can you submit a PR with patch for devel/icu? I'm a little discouraged after getting a dull response for trying to fix similar issue in security/cyrus-sasl2 (cf. ports/132573).
 
I use my home FreeBSD server as an AV-UPNP transcoding server. So SSE3s will come right in place for me.

I use AMD Athlon64 X2 - FreeBSD 8.0RC1, amd64, gcc44, -mssse3 and CPUTYPE?=native


Here are my results:

multimedia/xvid - fails build with:
Code:
L: libxvidcore.so.4
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: image/x86_asm/qpel_mmx.o: relocation 
R_X86_64_PC32 against symbol `xvid_FIR_14_3_2_1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

I'll add new ones here - once I find such.
 
john_doe said:
builds fine here using slightly old gcc44 (20091006) and gcc45 (20091001). Can you show error message?

Code:
===>  Building for libdvdread-4.1.3_1
cd obj && [B][color="Red"]gcc[/color][/B] -fPIC -DPIC -MD -O2 -pipe -mssse3 -march=native 
 -I/usr/local/include -fno-strict-aliasing  -Wall -funsigned-char -I/usr/ports/multimedia/libdvdread/work/libdvdread-4.1.3 
 -I"/usr/ports/multimedia/libdvdread/work/libdvdread-4.1.3"/src -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DHAVE_CONFIG_H -DHAVE_DLFCN_H
 -I"/usr/ports/multimedia/libdvdread/work/libdvdread-4.1.3"/src -c -o dvd_input.so /usr/ports/multimedia/libdvdread/work/libdvdread-4.1.3/src/dvd_input.c
cc1: error: unrecognized command line option "-mssse3"
gmake: *** [dvd_input.so] Error 1
*** Error code 1

Stop in /usr/ports/multimedia/libdvdread.

weird...

Also, i found this http://www.freebsd.org/cgi/query-pr.cgi?pr=112997

is it still safe to use CPUTYPE=native without the patch?
 
thuglife said:
Also, i found this http://www.freebsd.org/cgi/query-pr.cgi?pr=112997

is it still safe to use CPUTYPE=native without the patch?
The funny thing is even if you specify core2 in CPUTYPE <bsd.cpu.mk> will drop the value down to prescott/nocona (i386/amd64) unconditionally. If a user specified incorrect data then the system should fail, not lie to him and pretend that all is OK.

Besides, there are other ways to populate MACHINE_CPU
Code:
MACHINE_CPU != ${CC} -Q --help=target -march=native - </dev/null \
                | awk '/tune/ { print $$2 }; /sse|mmx|3dnow|altivec/ && /enable/ { sub("-m",""); print $$1 }'

or

MACHINE_CPU != ${CC} -dM -E -march=native - </dev/null | awk '/SSE|MMX|3dNOW/ && !/MATH/ { gsub("__",""); gsub("_","."); print tolower($$2) }'
$ make -V MACHINE_CPU -f a.mk
core2 sse sse2 sse3 sse4.1 ssse3


The latter one should work even with gcc in base.
 
Doesn't build (install):


P.S. On core 2, -march=native adds -mcx16 -msahf beside -march=core2 (??)

Code:
gcc44 -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'

Kind of a explanation -> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38749
 
john_doe said:
Code:
.for port in py-openssl net/portfoo portbar
. if ${.CURDIR:M*/${port}}
   CFLAGS := ${CFLAGS:N-mssse3}
. endif
.endfor
A variation of the code above doesn't work for me:
Code:
.for port in xxx yyy
.if !${.CURDIR:M*/${port}}
CC=gcc44
...
.endif
.endfor
I want to exclude all ports in the list from being built with gcc44. Where's my error? Right now, all ports are built with gcc44, regardless if they are in the list or not.

And how to match ports with '-' in the name? Matching x11/nvidia-drivers for example doesn't work with
Code:
.if empty(.CURDIR:M/usr/ports/x11/nvidia-driver)
but with
Code:
.if empty(.CURDIR:M/usr/ports/x11/nvidia*)
Putting quotes around the name didn't work... :\
 
nickolaev said:
multimedia/xvid - fails build with:
Code:
L: libxvidcore.so.4
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: image/x86_asm/qpel_mmx.o: relocation 
R_X86_64_PC32 against symbol `xvid_FIR_14_3_2_1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd8.0/4.4.2/../../../../../x86_64-portbld-freebsd8.0/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

I'll add new ones here - once I find such.

same issue here with gcc45, any way to resolve this?
 
Back
Top