What compiler is used to build a port

2013-07-01 Thread Olivier Nicole
Hi,

I have a strange situation: 2 machines, 9.1 p4, on the first machine,
graphicslibfpx build with the stock compiler:

$ make
=== Fetching all distfiles required by libfpx-1.3.1.1 for building
===  Extracting for libfpx-1.3.1.1
= SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
===  Patching for libfpx-1.3.1.1
===  Applying FreeBSD patches for libfpx-1.3.1.1
/usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
===  Configuring for libfpx-1.3.1.1
===  Building for libfpx-1.3.1.1
Warning: Object directory not changed from original 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1
g++  -O2 -pipe -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H...

and on the other machine it insists on using gcc 4.4 (which is
actually a mistake, libfpx will *not* compile with gcc 4.4 or gcc
4.6):

$ make 
=== Fetching all distfiles required by libfpx-1.3.1.1 for building
===  Extracting for libfpx-1.3.1.1
= SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
===  Patching for libfpx-1.3.1.1
===  Applying FreeBSD patches for libfpx-1.3.1.1
/usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
===   libfpx-1.3.1.1 depends on executable: gcc46 - not found
===Verifying install for gcc46 in /usr/ports/lang/gcc
Making GCC 4.6.3 for x86_64-portbld-freebsd9.1 [c,c++,objc,fortran,java]
===  Found saved configuration for gcc-4.6.3
=== Fetching all distfiles required by gcc-4.6.3 for building
===  Extracting for gcc-4.6.3
= SHA256 Checksum OK for gcc-4.6.3.tar.bz2.
===   gcc-4.6.3 depends on file: /usr/local/bin/perl5.14.4 - found

What could cause aport to request for a different compiler version
when both machines are very similar?

Best regards,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What compiler is used to build a port

2013-07-01 Thread Anton Shterenlikht
Date: Mon, 1 Jul 2013 15:36:46 +0700 (ICT)
From: Olivier Nicole olivier.nic...@cs.ait.ac.th
To: freebsd-questions@freebsd.org
Subject: What compiler is used to build a port

Hi,

I have a strange situation: 2 machines, 9.1 p4, on the first machine,
graphicslibfpx build with the stock compiler:

$ make
=== Fetching all distfiles required by libfpx-1.3.1.1 for building
===  Extracting for libfpx-1.3.1.1
= SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
===  Patching for libfpx-1.3.1.1
===  Applying FreeBSD patches for libfpx-1.3.1.1
/usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
===  Configuring for libfpx-1.3.1.1
===  Building for libfpx-1.3.1.1
Warning: Object directory not changed from original 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1
g++  -O2 -pipe -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H...

and on the other machine it insists on using gcc 4.4 (which is
actually a mistake, libfpx will *not* compile with gcc 4.4 or gcc
4.6):

$ make 
=== Fetching all distfiles required by libfpx-1.3.1.1 for building
===  Extracting for libfpx-1.3.1.1
= SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
===  Patching for libfpx-1.3.1.1
===  Applying FreeBSD patches for libfpx-1.3.1.1
/usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
===   libfpx-1.3.1.1 depends on executable: gcc46 - not found
===Verifying install for gcc46 in /usr/ports/lang/gcc
Making GCC 4.6.3 for x86_64-portbld-freebsd9.1 [c,c++,objc,fortran,java]
===  Found saved configuration for gcc-4.6.3
=== Fetching all distfiles required by gcc-4.6.3 for building
===  Extracting for gcc-4.6.3
= SHA256 Checksum OK for gcc-4.6.3.tar.bz2.
===   gcc-4.6.3 depends on file: /usr/local/bin/perl5.14.4 - found

What could cause aport to request for a different compiler version
when both machines are very similar?

Best regards,

Olivier

It seems you have different revisions of the ports
tree on the two boxes. Do

svn info /usr/ports

on both boxes, and see what revisions they have.

On amd64 with ports at r322188 it builds using
the system GCC compiler:

http://eis.bris.ac.uk/~mexas/libfpx-amd64-r322188-build.log

but looking at the port's svn log
(svn log /usr/ports/graphics/libfpx) shows


r311828 | miwi | 2013-02-07 12:36:20 + (Thu, 07 Feb 2013) | 2 lines

- Unbreak build for HEAD

Maybe your gcc-46 build is on a box with ports tree
prior to that revision?

Anton

P.S. In cases like these I usually email the maintainer
and copy to ports@.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What compiler is used to build a port

2013-07-01 Thread Olivier Nicole
Thank you Anto,

   I have a strange situation: 2 machines, 9.1 p4, on the first machine,
   graphicslibfpx build with the stock compiler:
 
   $ make
   === Fetching all distfiles required by libfpx-1.3.1.1 for building
   ===  Extracting for libfpx-1.3.1.1
   = SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
   ===  Patching for libfpx-1.3.1.1
   ===  Applying FreeBSD patches for libfpx-1.3.1.1
   /usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
   ===  Configuring for libfpx-1.3.1.1
   ===  Building for libfpx-1.3.1.1
   Warning: Object directory not changed from original 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1
   g++  -O2 -pipe -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H...
 
   and on the other machine it insists on using gcc 4.4 (which is
   actually a mistake, libfpx will *not* compile with gcc 4.4 or gcc
   4.6):
 
   $ make 
   === Fetching all distfiles required by libfpx-1.3.1.1 for building
   ===  Extracting for libfpx-1.3.1.1
   = SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
   ===  Patching for libfpx-1.3.1.1
   ===  Applying FreeBSD patches for libfpx-1.3.1.1
   /usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
   ===   libfpx-1.3.1.1 depends on executable: gcc46 - not found
   ===Verifying install for gcc46 in /usr/ports/lang/gcc
   Making GCC 4.6.3 for x86_64-portbld-freebsd9.1 [c,c++,objc,fortran,java]
   ===  Found saved configuration for gcc-4.6.3
   === Fetching all distfiles required by gcc-4.6.3 for building
   ===  Extracting for gcc-4.6.3
   = SHA256 Checksum OK for gcc-4.6.3.tar.bz2.
   ===   gcc-4.6.3 depends on file: /usr/local/bin/perl5.14.4 - found
 
   What could cause aport to request for a different compiler version
   when both machines are very similar?
 
   Best regards,
 
   Olivier
 
 It seems you have different revisions of the ports
 tree on the two boxes. Do
 
 svn info /usr/ports

I am using portsnap, not svn, but I check the md5 of each files in the
port (there are only 8 files) and they are the same.

And I tried to copy the directory from one machine to the other and
get the same result.

 on both boxes, and see what revisions they have.
 
 On amd64 with ports at r322188 it builds using
 the system GCC compiler:
 
 http://eis.bris.ac.uk/~mexas/libfpx-amd64-r322188-build.log
 
 but looking at the port's svn log
 (svn log /usr/ports/graphics/libfpx) shows
 
 
 r311828 | miwi | 2013-02-07 12:36:20 + (Thu, 07 Feb 2013) | 2 lines
 
 - Unbreak build for HEAD

My portsnap is much newer than February.

Thank you,

Olivier

 
 Maybe your gcc-46 build is on a box with ports tree
 prior to that revision?
 
 Anton
 
 P.S. In cases like these I usually email the maintainer
 and copy to ports@.

I will.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What compiler is used to build a port

2013-07-01 Thread Anton Shterenlikht
From olivier.nic...@cs.ait.ac.th Mon Jul  1 12:12:08 2013

   I have a strange situation: 2 machines, 9.1 p4, on the first 
machine,
   graphicslibfpx build with the stock compiler:
 
   $ make
   === Fetching all distfiles required by libfpx-1.3.1.1 for 
building
   ===  Extracting for libfpx-1.3.1.1
   = SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
   ===  Patching for libfpx-1.3.1.1
   ===  Applying FreeBSD patches for libfpx-1.3.1.1
   /usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
   ===  Configuring for libfpx-1.3.1.1
   ===  Building for libfpx-1.3.1.1
   Warning: Object directory not changed from original 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1
   g++  -O2 -pipe -DHAVE_WCHAR_H -DHAVE_DLFCN_H 
-DHAVE_SYS_TIME_H...
 
   and on the other machine it insists on using gcc 4.4 (which is
   actually a mistake, libfpx will *not* compile with gcc 4.4 or 
gcc
   4.6):
 
   $ make 
   === Fetching all distfiles required by libfpx-1.3.1.1 for 
building
   ===  Extracting for libfpx-1.3.1.1
   = SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
   ===  Patching for libfpx-1.3.1.1
   ===  Applying FreeBSD patches for libfpx-1.3.1.1
   /usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
   ===   libfpx-1.3.1.1 depends on executable: gcc46 - not found
   ===Verifying install for gcc46 in /usr/ports/lang/gcc
   Making GCC 4.6.3 for x86_64-portbld-freebsd9.1 
[c,c++,objc,fortran,java]
   ===  Found saved configuration for gcc-4.6.3
   === Fetching all distfiles required by gcc-4.6.3 for building
   ===  Extracting for gcc-4.6.3
   = SHA256 Checksum OK for gcc-4.6.3.tar.bz2.
   ===   gcc-4.6.3 depends on file: /usr/local/bin/perl5.14.4 - 
found
 
   What could cause aport to request for a different compiler 
version
   when both machines are very similar?
 
   Best regards,
 
   Olivier
 
 It seems you have different revisions of the ports
 tree on the two boxes. Do
 
 svn info /usr/ports

I am using portsnap, not svn, but I check the md5 of each files in the
port (there are only 8 files) and they are the same.

And I tried to copy the directory from one machine to the other and
get the same result.

 on both boxes, and see what revisions they have.
 
 On amd64 with ports at r322188 it builds using
 the system GCC compiler:
 
 http://eis.bris.ac.uk/~mexas/libfpx-amd64-r322188-build.log
 
 but looking at the port's svn log
 (svn log /usr/ports/graphics/libfpx) shows
 
 

 r311828 | miwi | 2013-02-07 12:36:20 + (Thu, 07 Feb 2013) | 2 
lines
 
 - Unbreak build for HEAD

My portsnap is much newer than February.

ok, what else could be different between the two boxes?

- /etc/make.conf ?

Anton

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: What compiler is used to build a port

2013-07-01 Thread Olivier Nicole
  I have a strange situation: 2 machines, 9.1 p4, on the first 
 machine,
  graphicslibfpx build with the stock compiler:

  $ make
  === Fetching all distfiles required by libfpx-1.3.1.1 for 
 building
  ===  Extracting for libfpx-1.3.1.1
  = SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
  ===  Patching for libfpx-1.3.1.1
  ===  Applying FreeBSD patches for libfpx-1.3.1.1
  /usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
  ===  Configuring for libfpx-1.3.1.1
  ===  Building for libfpx-1.3.1.1
  Warning: Object directory not changed from original 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1
  g++  -O2 -pipe -DHAVE_WCHAR_H -DHAVE_DLFCN_H 
 -DHAVE_SYS_TIME_H...

  and on the other machine it insists on using gcc 4.4 (which is
  actually a mistake, libfpx will *not* compile with gcc 4.4 or 
 gcc
  4.6):

  $ make 
  === Fetching all distfiles required by libfpx-1.3.1.1 for 
 building
  ===  Extracting for libfpx-1.3.1.1
  = SHA256 Checksum OK for libfpx-1.3.1-1.tar.xz.
  ===  Patching for libfpx-1.3.1.1
  ===  Applying FreeBSD patches for libfpx-1.3.1.1
  /usr/bin/sed -i '' -e '/^#include fpxlib-config.h/d'   
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics/filename.cpp  
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/gen_guid.cpp 
 /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpxlib.h
  ===   libfpx-1.3.1.1 depends on executable: gcc46 - not found
  ===Verifying install for gcc46 in /usr/ports/lang/gcc
  Making GCC 4.6.3 for x86_64-portbld-freebsd9.1 
 [c,c++,objc,fortran,java]
  ===  Found saved configuration for gcc-4.6.3
  === Fetching all distfiles required by gcc-4.6.3 for building
  ===  Extracting for gcc-4.6.3
  = SHA256 Checksum OK for gcc-4.6.3.tar.bz2.
  ===   gcc-4.6.3 depends on file: /usr/local/bin/perl5.14.4 - 
 found

  What could cause aport to request for a different compiler 
 version
  when both machines are very similar?

  Best regards,

  Olivier

It seems you have different revisions of the ports
tree on the two boxes. Do

svn info /usr/ports
 
   I am using portsnap, not svn, but I check the md5 of each files in the
   port (there are only 8 files) and they are the same.
 
   And I tried to copy the directory from one machine to the other and
   get the same result.
 
on both boxes, and see what revisions they have.

On amd64 with ports at r322188 it builds using
the system GCC compiler:

http://eis.bris.ac.uk/~mexas/libfpx-amd64-r322188-build.log

but looking at the port's svn log
(svn log /usr/ports/graphics/libfpx) shows


 
r311828 | miwi | 2013-02-07 12:36:20 + (Thu, 07 Feb 2013) | 2 
 lines

- Unbreak build for HEAD
 
   My portsnap is much newer than February.
 
 ok, what else could be different between the two boxes?
 
 - /etc/make.conf ?

No, I have checked that already.

Thanks anyway,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


(gstreamer-plugins-0.10.35_1,3) (compiler error)

2012-06-29 Thread Nikolai Wendorf

All,

Recent csup introduced this error

===  Building for gstreamer-plugins-0.10.36,3
.
.
gmake[3]: Entering directory 
`/usr/ports/multimedia/gstreamer-plugins/work/gst-p

lugins-base-0.10.36/gst/audioresample'
  CC libgstaudioresample_la-gstaudioresample.lo
  CC libgstaudioresample_la-speex_resampler_int.lo
  CC libgstaudioresample_la-speex_resampler_float.lo
In file included from resample.c:134,
 from speex_resampler_float.c:26:
resample_sse.h: In function 'inner_product_single':
resample_sse.h:46: error: '__m128' undeclared (first use in this function)
resample_sse.h:46: error: (Each undeclared identifier is reported only once
resample_sse.h:46: error: for each function it appears in.)
resample_sse.h:46: error: expected ';' before 'sum'
resample_sse.h:49: error: 'sum' undeclared (first use in this function)
resample_sse.h:49: warning: implicit declaration of function '_mm_add_ps'
resample_sse.h:49: warning: nested extern declaration of '_mm_add_ps'
resample_sse.h:49: warning: implicit declaration of function '_mm_mul_ps'
resample_sse.h:49: warning: nested extern declaration of '_mm_mul_ps'
resample_sse.h:49: warning: implicit declaration of function '_mm_loadu_ps'

the final complaint from portupgrade was
! multimedia/gstreamer-plugins (gstreamer-plugins-0.10.35_1,3)  
(compiler error)



FreeBSD 8.3-STABLE #0: Thu Jun 28 12:56:46 EDT 2012

thanks,
Nick
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: setting gcc46 as default compiler?

2012-06-08 Thread Volodymyr Kostyrko

Jeff Hamann написал:

I've built and installed the gcc46 compiler(s) - need gfortran - and I can't 
seem to find the correct documentation on how to update /etc/make.conf for 
including the gfortran46.

This is what mine currently looks like:

$ cat make.conf
# added by use.perl 2012-06-07 03:03:21
PERL_VERSION=5.10.1
..if !empty(.CURDIR:M/usr/ports/*)  exists(/usr/local/bin/gcc46)
CC=gcc46
CXX=g++46
CPP=cpp46
FC=gfortran46
..endif

FFLAGS=-O2 -mtune=athlon64
CC=gcc46
CXX=g++46
CPP=cpp46
FC=gfortran46

$

Am I close? Help?


When I want some port to use gcc46 I use USE_GCC=4.6+. This takes care 
of depending ports on gcc port.


--
Sphinx of black quartz judge my vow.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


setting gcc46 as default compiler?

2012-06-07 Thread Jeff Hamann
I've built and installed the gcc46 compiler(s) - need gfortran - and I can't 
seem to find the correct documentation on how to update /etc/make.conf for 
including the gfortran46. 

This is what mine currently looks like:

$ cat make.conf
# added by use.perl 2012-06-07 03:03:21
PERL_VERSION=5.10.1
.if !empty(.CURDIR:M/usr/ports/*)  exists(/usr/local/bin/gcc46)
CC=gcc46
CXX=g++46
CPP=cpp46
FC=gfortran46
.endif

FFLAGS=-O2 -mtune=athlon64
CC=gcc46
CXX=g++46
CPP=cpp46
FC=gfortran46

$ 

Am I close? Help?

Respectfully,
Jeff.


Jeff Hamann, PhD
PO Box 1421
Corvallis, Oregon 97339-1421
230 SW 3rd Street Suite #310
Corvallis, Oregon 97333
541-602-5438 (c)
541-754-2457 (h)
jeff.hamann[at]forestinformatics[dot]com
jeff.d.hamann[at]gmail[dot]com
http://www.forestinformatics.com
http://en.wikipedia.org/wiki/Forest_informatics

To ensure that your email is processed, include a subject entry in your email.




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Which compiler compiled system?

2012-03-12 Thread kaltheat
Hi,

Is there a way to determine whether a FreeBSD-system was compiled with gcc or 
clang?
I thought of some libs or so that might significantly differ.

Regards,
kaltheat

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Which compiler compiled system?

2012-03-12 Thread Pierre-Luc Drouin
If Java is broken, then you know FreeBSD was compiled with clang...

On Mon, Mar 12, 2012 at 3:45 PM, kalth...@googlemail.com wrote:

 Hi,

 Is there a way to determine whether a FreeBSD-system was compiled with gcc
 or clang?
 I thought of some libs or so that might significantly differ.

 Regards,
 kaltheat

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Which compiler compiled system?

2012-03-12 Thread Da Rock

On 03/13/12 06:49, Pierre-Luc Drouin wrote:

If Java is broken, then you know FreeBSD was compiled with clang...

I wouldn't say that is categorical.


On Mon, Mar 12, 2012 at 3:45 PM,kalth...@googlemail.com  wrote:


Hi,

Is there a way to determine whether a FreeBSD-system was compiled with gcc
or clang?
I thought of some libs or so that might significantly differ.

Regards,
kaltheat

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Which compiler compiled system?

2012-03-12 Thread Matthew Story
On Mon, Mar 12, 2012 at 6:55 PM, Da Rock 
freebsd-questi...@herveybayaustralia.com.au wrote:

 On 03/13/12 06:49, Pierre-Luc Drouin wrote:

 If Java is broken, then you know FreeBSD was compiled with clang...

 I wouldn't say that is categorical.


 On Mon, Mar 12, 2012 at 3:45 PM,kalth...@googlemail.com  wrote:

  Hi,

 Is there a way to determine whether a FreeBSD-system was compiled with
 gcc
 or clang?
 I thought of some libs or so that might significantly differ.


strings on a clang v. gcc compile shows no differences (at least in my
tests), but binaries compiled with clang and gcc seem to reliable show
differences at the 25th character of the compiled program, although the
differences at the 25th character are not consistent across programs ...

$ # one example
$ gcc -Wall -o hello_world.gcc hello_world.c
$ clang -Wall -o hello_world.clang hello_world.c
$ cmp hello_world.gcc hello_world.clang
hello_world.gcc hello_world.clang differ: char 25, line 1

this does suggest that if you know gcc and clang are the only 2 options for
compilation on a system, and you have a version compiled with the same
flags on the same system from a known compiler, you should be able to
reliably detect compilation by the other compiler using cmp ... although
this may be more or less meaningless to you depending on how much control
you have over the variables (e.g. binaries built on the same system,
ability to know which compilation flags were sent at compile time, etc ...):

$ # hello_world here is ``in the wild''
$ clang -Wall -o hello_world.clang hello_world.c
$ if cmp hello_world.clang hello_world  /dev/null 2 /dev/null; then echo
built with clang; else echo built with gcc; fi
built with clang



 Regards,
 kaltheat

 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscribe@**freebsd.orgfreebsd-questions-unsubscr...@freebsd.org
 

  __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org


 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org




-- 
regards,
matt
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Which compiler compiled system?

2012-03-12 Thread Chad Perrin
On Mon, Mar 12, 2012 at 04:49:38PM -0400, Pierre-Luc Drouin wrote:

 If Java is broken, then you know FreeBSD was compiled with clang...

It's probably more accurate to say If Java is not broken, it's almost
certainly built with GCC.  If it's broken, it could go either way.

(No offense to the Java maintainers at the FreeBSD project, of course.
They do a great job of making it possible to get working at all.)

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Which compiler compiled system?

2012-03-12 Thread Chuck Swiger
On Mar 12, 2012, at 12:45 PM, kalth...@googlemail.com wrote:
 Is there a way to determine whether a FreeBSD-system was compiled with gcc or 
 clang?
 I thought of some libs or so that might significantly differ.

It's fairly easy to determine whether assembly code was compiled with gcc or 
clang from idioms they use-- GCC emits .ascii for strings and then adds a 
trailing null; clang uses .asciz, for example.  From that you can also figure 
out whether a particular executable or shared library was compiled with one or 
the other-- gcc is doing a leaf frame caller optimization, where it leave / jmp 
to puts() (using the stack frame allocated for main()), whereas clang is doing 
normal stack frame handling of %rpb and explicit return.

Regards,
-- 
-Chuck

% cat h.c
#include stdio.h

int main() {
puts(Hello, world!\n);
}
% gcc -S -O2 -o h-gcc.s h.c
% clang -S -O2 -o h-clang.s h.c
% cat h-gcc.s
.cstring
LC0:
.ascii Hello, world!\12\0
.text
.align 4,0x90
.globl _main
_main:
LFB3:
pushq   %rbp
LCFI0:
movq%rsp, %rbp
LCFI1:
leaqLC0(%rip), %rdi
leave
jmp _puts
LFE3:
.section 
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0
LSCIE1:
.long   0x0
.byte   0x1
.ascii zR\0
.byte   0x1
.byte   0x78
.byte   0x10
.byte   0x1
.byte   0x10
.byte   0xc
.byte   0x7
.byte   0x8
.byte   0x90
.byte   0x1
.align 3
LECIE1:
.globl _main.eh
_main.eh:
LSFDE1:
.set L$set$1,LEFDE1-LASFDE1
.long L$set$1
LASFDE1:
.long   LASFDE1-EH_frame1
.quad   LFB3-.
.set L$set$2,LFE3-LFB3
.quad L$set$2
.byte   0x0
.byte   0x4
.set L$set$3,LCFI0-LFB3
.long L$set$3
.byte   0xe
.byte   0x10
.byte   0x86
.byte   0x2
.byte   0x4
.set L$set$4,LCFI1-LCFI0
.long L$set$4
.byte   0xd
.byte   0x6
.align 3
LEFDE1:
.subsections_via_symbols

% cat h-clang.s
.section__TEXT,__text,regular,pure_instructions
.globl  _main
.align  4, 0x90
_main:  ## @main
Leh_func_begin0:
## BB#0:
pushq   %rbp
Ltmp0:
movq%rsp, %rbp
Ltmp1:
leaqL_.str(%rip), %rdi
callq   _puts
xorl%eax, %eax
popq%rbp
ret
Leh_func_end0:

.section__TEXT,__cstring,cstring_literals
L_.str: ## @.str
.asciz   Hello, world!\n

.section
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame0:
Lsection_eh_frame0:
Leh_frame_common0:
Lset0 = Leh_frame_common_end0-Leh_frame_common_begin0 ## Length of Common 
Information Entry
.long   Lset0
Leh_frame_common_begin0:
.long   0   ## CIE Identifier Tag
.byte   1   ## DW_CIE_VERSION
.asciz   zR   ## CIE Augmentation
.byte   1   ## CIE Code Alignment Factor
.byte   120 ## CIE Data Alignment Factor
.byte   16  ## CIE Return Address Column
.byte   1   ## Augmentation Size
.byte   16  ## FDE Encoding = pcrel
.byte   12  ## DW_CFA_def_cfa
.byte   7   ## Register
.byte   8   ## Offset
.byte   144 ## DW_CFA_offset + Reg (16)
.byte   1   ## Offset
.align  3
Leh_frame_common_end0:
.globl  _main.eh
_main.eh:
Lset1 = Leh_frame_end0-Leh_frame_begin0 ## Length of Frame Information Entry
.long   Lset1
Leh_frame_begin0:
Lset2 = Leh_frame_begin0-Leh_frame_common0 ## FDE CIE offset
.long   Lset2
Ltmp2:  ## FDE initial location
.quad   Leh_func_begin0-Ltmp2
Lset3 = Leh_func_end0-Leh_func_begin0   ## FDE address range
.quad   Lset3
.byte   0   ## Augmentation size
.byte   4   ## DW_CFA_advance_loc4
Lset4 = Ltmp0-Leh_func_begin0
.long   Lset4
.byte   14  ## DW_CFA_def_cfa_offset
.byte   16  ## Offset
.byte   134 ## DW_CFA_offset + Reg (6)
.byte   2   ## Offset
.byte   4   ## DW_CFA_advance_loc4
Lset5 = Ltmp1-Ltmp0
.long   Lset5
.byte   13  ## DW_CFA_def_cfa_register
.byte   6   ## Register
.align  3
Leh_frame_end0:

.subsections_via_symbols

...and here's a disassembly of main() from gcc:

_main:

on purpose or forgotten ? hardcoded compiler in basesystem-makefiles

2012-03-05 Thread Dr. A. Haakh

a quick search revealed following usages:

FreeBSD abaton.Haakh.de 9.0-STABLE FreeBSD 9.0-STABLE #0: Wed Feb 29 
13:49:36 CET 2012 t...@abaton.haakh.de:/usr/obj/usr/src/sys/ABATON  i386


ah@abaton:~$ find /usr/src/ -name Makefile\* -exec egrep 
'^[[:blank:]]+[gc+]{2,3}[[:blank:]]+..' {} \; -print
cc -D__dead2= -D__unused= -Darc4random=random 
-D__FBSDID=static const char *id= -DDEFSHELLNAME=\sh\ -I. -c *.c

cc *.o -o pmake
/usr/src/usr.bin/make/Makefile.dist
gcc -M $(CFLAGS) $(SRC)  Makefile.tmp
/usr/src/crypto/openssl/demos/engines/cluster_labs/Makefile
gcc -M $(CFLAGS) $(SRC)  Makefile.tmp
/usr/src/crypto/openssl/demos/engines/zencod/Makefile
gcc -M $(CFLAGS) $(SRC)  Makefile.tmp
/usr/src/crypto/openssl/demos/engines/ibmca/Makefile
cc -I../../include divtest.c -o divtest ../../libcrypto.a
cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
gcc -I.. -g div.c ../../libcrypto.a
/usr/src/crypto/openssl/crypto/bn/Makefile
cc -g -I../../include -c test.c
cc -g -I../../include -o test test.o -L../.. -lcrypto
cc -g -I../../include -c pk.c
cc -g -I../../include -o pk pk.o -L../.. -lcrypto
/usr/src/crypto/openssl/crypto/asn1/Makefile
gcc -o ${.TARGET} ${_f} -lrt
/usr/src/tools/test/dtrace/Makefile
c++ -o $@ $ -lpthread
/usr/src/tools/regression/pthread/unwind/Makefile
gcc -c -o elftls.o ${.CURDIR}/elftls.S
gcc -c -o tls-test.o ${.CURDIR}/tls-test-lib.c
gcc $(CFLAGS) -rdynamic -o ttls3 ${.CURDIR}/tls-test.c
/usr/src/tools/regression/tls/ttls3/Makefile
gcc -Wall -o accf_data_attach accf_data_attach.c
/usr/src/tools/regression/sockets/accf_data_attach/Makefile
gcc $(LDFLAGS) $(DLL_LN_OPTS) ./lib/$*$(DLL_TAG).lib \
gcc $(LDFLAGS) $(DLL_LN_OPTS) ./lib/$*$(DLL_TAG).lib \
/usr/src/contrib/ncurses/Makefile.os2
g++ -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $ $(OUTPUT_OPTION)
g++ -o $@ paranoia.o real.o $(LIBIBERTY)
/usr/src/contrib/gcc/Makefile.in
gcc -o asyncwatch asyncwatch.c ${CFLAGS}
gcc -o devinfo devinfo.c ${CFLAGS}
gcc -o device_list device_list.c  ${CFLAGS}
gcc -o rc_pingpong rc_pingpong.c pingpong.c ${CFLAGS}
gcc -o srq_pingpong srq_pingpong.c pingpong.c ${CFLAGS}
gcc -o uc_pingpong uc_pingpong.c pingpong.c ${CFLAGS}
gcc -o ud_pingpong ud_pingpong.c pingpong.c ${CFLAGS}
/usr/src/contrib/ofed/libibverbs/examples/Makefile
cc -E $$i |\
/usr/src/contrib/libreadline/examples/rlfe/Makefile.in
cc -o test ${.CURDIR}/test.c -lrpcsvc
/usr/src/usr.sbin/rpc.lockd/Makefile
cc -o test test.c -lrpcsvc
/usr/src/usr.sbin/rpc.statd/Makefile
gcc -g -DSPARC_XXX ${MUL} -o ${.TARGET}
gcc -g -DSPARC_XXX ${DIVREM} -o ${.TARGET}
/usr/src/lib/libc/quad/TESTS/Makefile
cc ${CFLAGS} -static tst01.o -o tst01 libdisk.a
/usr/src/lib/libdisk/Makefile
gcc -g3 msgring.lex.c msgring.yacc.c -o msgring
/usr/src/sys/mips/rmi/Makefile.msgring

ah@abaton:~$ find /usr/src/ -name Makefile\* -exec egrep 
'^[[:blank:]]+cpp[[:blank:]]+..' {} \; -print

cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
/usr/src/contrib/binutils/ld/Makefile.in
cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
/usr/src/contrib/binutils/ld/Makefile.am

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: on purpose or forgotten ? hardcoded compiler in basesystem-makefiles

2012-03-05 Thread Matthew Seaman
On 05/03/2012 10:12, Dr. A. Haakh wrote:
 a quick search revealed following usages:

Some of the instances you've found are legitimate, some are in upstream
code in contributed software -- the FreeBSD build process may not even
use the Makefiles concerned.  But, yes on the whole, I think you're on
to something that needs fixing here.

 FreeBSD abaton.Haakh.de 9.0-STABLE FreeBSD 9.0-STABLE #0: Wed Feb 29
 13:49:36 CET 2012 t...@abaton.haakh.de:/usr/obj/usr/src/sys/ABATON 
 i386
 
 ah@abaton:~$ find /usr/src/ -name Makefile\* -exec egrep
 '^[[:blank:]]+[gc+]{2,3}[[:blank:]]+..' {} \; -print

[...]

 /usr/src/usr.bin/make/Makefile.dist
 gcc -M $(CFLAGS) $(SRC)  Makefile.tmp

Although it doesn't seem to appear in the clang(1) man page, clang
supports the -M flag:

lucid-nonsense:/tmp:# clang -M hello.c
hello.o: hello.c /usr/include/stdio.h /usr/include/sys/cdefs.h \
  /usr/include/sys/_null.h /usr/include/sys/_types.h \
  /usr/include/machine/_types.h

No need for this sort of construct to be gcc specific.

 /usr/src/tools/test/dtrace/Makefile
 c++ -o $@ $ -lpthread

Not sure about this -- the intent may be to test the default system
compiler -- as of this last weekend you can install clang(1) as
/usr/bin/cc in stable/9, so this isn't necessarily gcc specific.

 /usr/src/tools/regression/pthread/unwind/Makefile
 gcc -c -o elftls.o ${.CURDIR}/elftls.S
 gcc -c -o tls-test.o ${.CURDIR}/tls-test-lib.c
 gcc $(CFLAGS) -rdynamic -o ttls3 ${.CURDIR}/tls-test.c

Whereas this looks like an oversight to me.

 /usr/src/crypto/openssl/demos/engines/ibmca/Makefile
 cc -I../../include divtest.c -o divtest ../../libcrypto.a
 cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a
 gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a
 gcc -I.. -g div.c ../../libcrypto.a

/usr/src/crypto holds raw sources imported from upstream; hard-coded
compiler names here is a problem the openssl project should address.

 /usr/src/contrib/ncurses/Makefile.os2
 g++ -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $ $(OUTPUT_OPTION)
 g++ -o $@ paranoia.o real.o $(LIBIBERTY)

Ditto /usr/src/contrib -- raw upstream sources.

 /usr/src/contrib/gcc/Makefile.in
 gcc -o asyncwatch asyncwatch.c ${CFLAGS}
 gcc -o devinfo devinfo.c ${CFLAGS}
 gcc -o device_list device_list.c  ${CFLAGS}
 gcc -o rc_pingpong rc_pingpong.c pingpong.c ${CFLAGS}
 gcc -o srq_pingpong srq_pingpong.c pingpong.c ${CFLAGS}

... although gcc being hardwired in the gcc sources is probably
intentional and quite legitimate.

I suggest that you repost your question on freebsd-hack...@freebsd.org,
as that will bring it to the attention of the people both interested in
and capable of addressing this sort of problem.  Submitting a PR
wouldn't go amiss either.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Compiler

2011-11-20 Thread Yordan Petrov
Hi
How could I compile some cgi files for FreeBSD
Is there any online tool ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Base compiler and amdfam10 - anybody/anything? (fwd)

2011-11-20 Thread Vladimir Kushnir
Sorry for crossposting but since no one on hackers@ seems to be 
interested...


-- Forwarded message --
Date: Wed, 16 Nov 2011 12:30:35 +0200 (EET)
From: Vladimir Kushnir vkush...@bigmir.net
To: hack...@freebsd.org
Subject: Base compiler and amdfam10 - anybody/anything?

Hi,
Are there any attempts to bring to -CURRENT newer AMD chips support? 
Personally, I've just tried to apply the patches from openSUSE's gcc-4.2.1 
SRPM. With slight adaptation they've applied and gave rather significant boost 
in resulting code speed. At least, testfcpy by Alexander Konovalenko 
(http://daemon.safety.sci.kth.se/~kono/testfcpu) gave me ~20% (!) speedup with 
-march=amdfam10 compared to our -march=athlon64-sse3 on Phenom II 970.
Unfortunately, the patched compiler with -march=amdfam10 fails in buildworld 
(internal compiler error's while compiling clang). The buildworld was 
successful with patched compiler and -march=athlon64-sse3 but since this is my 
main working system... Well, I had to come back to our unpatched compiler :-(
If anyone is interested, the patches were taken from 
gcc42-4.2.1_20070724-17.src.rpm (actually, I applied all the patches marked as 
AMD stuff), the resulting patches towards our src/contrib/gcc and 
share/mk/bsd.cpu.mk are attached (or I can send them by email), and I am quite 
ready to test what comes out of it.


WBR,
Vladimir

gcc-amdfam10.diff.gz
Description: Binary data


bsd.cpu.mk.amdfam10.gz
Description: Binary data
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Custom compiler/{C,CXX,F}FLAGS and /etc/make.conf - how to?

2011-11-09 Thread Vladimir Kushnir

Dear ALL,
The subject says it all. I'm trying to push out of my box every ounce of 
performance, perhaps even with (yet experimental) path64 compiler. So my 
question is as simple as that: what is the precise spell to put in 
make.comf to get (while not disrupting the ports infrastructure!) 
-march=amdfam10 if compiler is lang/gcc46 and -march=barcelona for path64 
(perhaps yet another flags as well if toolchain supports them)?


TIA,
Vladimir

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How should I complain about ARM compiler?

2011-09-26 Thread Naoyuki Tai

Hello,

I'm working on running a FreeBSD system on Globalscale's
DreamPlug. It's an ARM processor hardware.

I hit a problem which is the PR  arm/154189, and it turned out that
there is a bug in GCC's ARM's code generation.

The GCC in arm's world is cross-compiled from Release 8.2 on
i386, and is version 4.2.1.

I looked at the GNU's bug tracking web site, and looks like the
similar bug is reported but not exact. However, there is a certain
chance that it is fixed in later versions of GCC than 4.2.

I wanted to see whether or not fixed. So naturally, I tried to install the
GCC versions from the port, but GCC 4.2 is the only one that supports
ARM. None of newer versions is marked to work on ARM.

I could file a PR to GNU's. If it's new or dupe or already-fixed bug,
at some point, it may or may not be fixed.
But, bigger problem to me is that, FreeBSD 8.2's GCC 4.2 is the
only one that marked to work for ARM, either in the distribution or
in the port tree.

So, who should I complain to?
Chances are slim that -STABLE's compiler gets updated to my
liking. I have no way of knowing right now that the compilers
in the ports work for me or not.
My best case scenario is that, someone patches up GCC 4.2.1's
arm backend in -STABLE. If this is to happen, am I filing a PR
to -STABLE or under arm/ (which gets virtually no attension)?

Should I ask GCC 4.5 or 4.6 to work for arm? It may or may not
fix my problem, so I'm not sure I want to file PR for the GCCs in
the port to support ARM.

Although I was able to get around the build problem of perl5.12,
(as in arm/154189), I just hit another problem with devel/icu,
which I'm chasing right now, and maybe I have to file a PR.
So, my confidence in GCC 4.2.1 for ARM is zero.

Please someone tell me what is the right way to complain about
the ARM's compiler situation.
Thanks.

-- Tai

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-23 Thread Michael D. Norwick

On 01/22/2011 22:22, Robert Bonomi wrote:

 From owner-freebsd-questi...@freebsd.org  Sat Jan 22 20:10:21 2011
Date: Sat, 22 Jan 2011 20:00:52 -0600
From: Michael D. Norwickmnorw...@centurytel.net
To: freebsd-questions@freebsd.org
Subject: Colorized compiler/linker messages

Good Day,

I have seen this for some time when building ports and was wondering how
it was done.  GCC when compiling and linking certain programs, ebook for
example, emits messages in various colors.  How is that done?
 

Whatever it is that is writing the messages is putting out 'terminal
control' character strings that specify the color.

   

Where does
one find what the various colors are supposed to signify?
 

Read the _complete_ documentation for 'whatever it is' that is producing
the messages.  The colors signify 'whatever it is' that the author of that
software chose to represent with that color.  There are *NO* universal
standards for such things.

   

Or, is it just
because it's more appealing?
 

(A) appealing is in the eye of the beholder.
(B) *why* 'somebody' did something/anything is known *only* to the party
 that actually _did_ it.  You can ether ask *them* or get uninformed
 speculation from third parties.

In broad, diagsnotic messages can be divided into a minimum of 4 'classes'
(finer gradation is always possible):
 diagnostic -- 'gory details' of what the program is doing internally, to
find out where what it is actually  doing is different from what one
'expects' it to be doing.
 informational -- things you might 'want to know about', but do not
indicate potentially incorrect operation.
 warning -- things which *probably* indicate a problem, but might be
'as intended'
 error -- something which is, without question, incorrect, and prevents
proper program operation.


A developer -might- use different colors for different 'classes' of messages,
so that an experienced user of that program (who 'knows' what color is used
for what) can tell 'at a glance' the  serverity of the thing being reported.
[ see (B), above, as regards applicability to -your- situationn ]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


   
Sounds like you had a bad day yesterday.  I'm sorry,  I will try to scan 
any further e-mails for the appropriate intelligence.  Isn't that why 
it's called FreeBSD-questions and not ab...@freebsd.org?  And, yes, I 
read the docs.


Thank You,
Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-23 Thread Mark Johnston
On Sat, Jan 22, 2011 at 08:00:52PM -0600, Michael D. Norwick wrote:
 Good Day,
 
 I have seen this for some time when building ports and was wondering
 how it was done.  GCC when compiling and linking certain programs,
 ebook for example, emits messages in various colors.  How is that
 done?  Where does one find what the various colors are supposed to
 signify?  Or, is it just because it's more appealing?
 
 Thank You,
 
 Michael

I'm not sure about ebook specifically, but there's a wrapper for gcc called 
colorgcc which colorizes the diagnostics and errors that gcc emits. The idea is
that one can just do something like CC=colorgcc make when building.

I'm sure there are other programs out there that do something similar,
but colorgcc is the most common I think. Apparently there are similar
wrappers for make and diff as well.

-Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-23 Thread Michael D. Norwick

On 01/23/2011 17:07, Mark Johnston wrote:

On Sat, Jan 22, 2011 at 08:00:52PM -0600, Michael D. Norwick wrote:
   

Good Day,

I have seen this for some time when building ports and was wondering
how it was done.  GCC when compiling and linking certain programs,
ebook for example, emits messages in various colors.  How is that
done?  Where does one find what the various colors are supposed to
signify?  Or, is it just because it's more appealing?

Thank You,

Michael
 

I'm not sure about ebook specifically, but there's a wrapper for gcc called
colorgcc which colorizes the diagnostics and errors that gcc emits. The idea is
that one can just do something like CC=colorgcc make when building.

I'm sure there are other programs out there that do something similar,
but colorgcc is the most common I think. Apparently there are similar
wrappers for make and diff as well.

-Mark
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


   

Thank You,

I'll look up the man pages for colorgcc and see if it is installed on my 
system.  This explains a lot.


Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Colorized compiler/linker messages

2011-01-22 Thread Michael D. Norwick

Good Day,

I have seen this for some time when building ports and was wondering how 
it was done.  GCC when compiling and linking certain programs, ebook for 
example, emits messages in various colors.  How is that done?  Where 
does one find what the various colors are supposed to signify?  Or, is 
it just because it's more appealing?


Thank You,

Michael
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-22 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Sat Jan 22 20:10:21 2011
 Date: Sat, 22 Jan 2011 20:00:52 -0600
 From: Michael D. Norwick mnorw...@centurytel.net
 To: freebsd-questions@freebsd.org
 Subject: Colorized compiler/linker messages

 Good Day,

 I have seen this for some time when building ports and was wondering how 
 it was done.  GCC when compiling and linking certain programs, ebook for 
 example, emits messages in various colors.  How is that done?

Whatever it is that is writing the messages is putting out 'terminal 
control' character strings that specify the color.

Where does 
 one find what the various colors are supposed to signify?

Read the _complete_ documentation for 'whatever it is' that is producing
the messages.  The colors signify 'whatever it is' that the author of that
software chose to represent with that color.  There are *NO* universal
standards for such things.

Or, is it just 
 because it's more appealing?

(A) appealing is in the eye of the beholder.
(B) *why* 'somebody' did something/anything is known *only* to the party
that actually _did_ it.  You can ether ask *them* or get uninformed
speculation from third parties.

In broad, diagsnotic messages can be divided into a minimum of 4 'classes'
(finer gradation is always possible):
diagnostic -- 'gory details' of what the program is doing internally, to 
   find out where what it is actually  doing is different from what one
   'expects' it to be doing.
informational -- things you might 'want to know about', but do not 
   indicate potentially incorrect operation.
warning -- things which *probably* indicate a problem, but might be
   'as intended'
error -- something which is, without question, incorrect, and prevents
   proper program operation.


A developer -might- use different colors for different 'classes' of messages,
so that an experienced user of that program (who 'knows' what color is used
for what) can tell 'at a glance' the  serverity of the thing being reported.
[ see (B), above, as regards applicability to -your- situationn ]



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Colorized compiler/linker messages

2011-01-22 Thread Charlie Kester

On Sat 22 Jan 2011 at 18:00:52 PST Michael D. Norwick wrote:

Good Day,

I have seen this for some time when building ports and was wondering how 
it was done.  GCC when compiling and linking certain programs, ebook for 
example, emits messages in various colors.  How is that done?  Where 
does one find what the various colors are supposed to signify?  Or, is

it just because it's more appealing?


CMake can be used to generate Makefiles that produce colorized output,
and I would wager that it's being used by most of the ports where you're
seeing color. 


But there are many tools a developer might use for this.  For example, I
found this in my bookmarks file:

http://phil.freehackers.org/pretty-make/index.html

I think it's mostly aesthetics, but some people claim that using
different colors for different build steps makes it easier to monitor
the progress of the build.  For example, if the link or install steps
are a different color than the configuration or compile steps, you can
see that the build is in its final stages even if you're on the other
side of the room.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling software with different compiler than cc or clang results in unusable output

2010-09-12 Thread Ian Smith
In freebsd-questions Digest, Vol 327, Issue 11, Message: 4
On Sat, 11 Sep 2010 O. Hartmann ohart...@mail.zedat.fu-berlin.de wrote:
  On 09/11/10 11:43, Andrew Brampton wrote:
   On 11 September 2010 10:28, O. Hartmann
   ohart...@mail.zedat.fu-berlin.de  wrote:
  
   you see me a kind of desperate. I wrote my own a small piece of  
   software in
   C, calculating the orbit and position of astronomical objects, astroids, 
   in
   a heliocentric coordinate system from Keplerian orbital elements. So far.

Don't expect too much accuracy from Keplerian orbits anywhere vaguely 
near Jupiter or Saturn - but yes they're a great place to start from.

   The software calculates the set of points of an ellipse based upon
   ephemeridal datas taken from the Minor Planet Cataloge. Again, so far,
   everything all right. The set of points of an orbit is all right and
   correct. But when it comes to positions at a specific time, then I loose
   hair!

The program mentioned below can generate accurate results for as often 
as every few hours; handy at least for comparing your results over time.

   Compiling this piece of software with FreeBSD's gcc (V4.2) and clang 
   (clang
   devel) on my private and lab's FreeBSD boxes (both most recent FreeBSD
   8.1/amd64), this program does well, the calculated orbital positions are
   very close to professional applications or observational checks. But when
   compiling the sources with gcc44 or gcc45 (same source, same CFLAG 
   setting,
   mostly no CFLAGS set), then there is a great discrepancy. Sometimes when
   plotting positions, the results plotted seconds before differs from the 
   most
   recent. The ellipses are allways correct, but the position of a single 
   point
   at a specific time isn't correct.

Know the feeling; it took Kepler 20 years to get ellipses down pat :)

   I use the GNU autotools to build the package.
  
   I suspekt miscompilations in memory alloction or in some time- or
   mathematical functions like sin, cos.
  
   before I digg deeper I'd like to ask the community for some hints how to
   hunt down such a problem.
  
   regards,
   Oliver
  
   Sounds a cool project. I suspect you are miss-using a feature of C or
   are using uninitialised memory, and with gcc44/45's more aggressive
   optimisations it is getting it wrong. I have three suggestions
  
   1) Use valgrind to check if it finds anything wrong when running your
   program. Check both the good and the bad builds.
  
   2) If your program is made up of multiple C files, then try compiling
   all of the C files with gcc42, but just one at a time with gcc44. This
   way will help you track down exactly which C file has the bug.
  
   3) Finally do some printf debugging to find the first line of code
   that is generating the wrong value.
  
   I hope these suggestions help.
   Andrew
  
  Hello Andrew.
  
  Thanks for your comments, they are worth trying out. I will do so ...
  
  item 2) oh, yes, a very good idea ...
  
  item 3) I did already, the whole software is built up by those printf's.
  
  The problem boiled down to be some problem in the UNIX time routines. I 
  use localtime(3), time(3) and a strftime(3) and strptime(3).
  
  I use a 'wikipedia'-algorithm converting the actual time string into an 
  'epoch' used in astronomical calculations. Compiling this routine with 
  gcc42 and clang everything is all right, compiling it with gcc44 or 
  gcc45 it returns 10 times higher values. I use very 'primitive' cutoffs 
  for casting a double value into an int - I need the integrale value, not 
  the remainings after the decimal point. I will check this again and look 
  forward for a cleaner solution. But isn't this a 'bug'?
  
  I'll try the BETA of the new FreeBSD PathScale compiler if I get some.
  
  Well, I'll report ...

Please do.  Well I can't help at all about the compilers, but I suggest 
having a close look over Steve Moshier's 'Numerical Integration of Sun, 
Moon and Planets' at http://www.moshier.net/ssystem.html

I compiled the contents of http://www.moshier.net/de118i-2.zip as-is on 
a FreeBSD 5.5 system four years ago and it just ran, reproducing closely 
my late '90s results from the then DOS version SSYSTEM.EXE; there are 
#defines for using doubles or long doubles, major asteroids on not, even 
including 'your' asteroid's elements, and test results for comparison.

You could check how your different compilers treat those sources?  Apart 
from that it's very readable code and there's just about every maths and 
trig function imaginable, including quadrant-correct arctans and such.  
And also, of course, Julian Ephemeris Date handling routines .. not to 
mention close-to-JPL positions and velocities over many centuries :)

Good luck.  I'm hoping to revive and extend from my '90s Pascal astro 
programs in FPC soon to chew on 100s of years of ssystem ephemerides. 

HTH, Ian___
freebsd-questions@freebsd.org mailing list

Compiling software with different compiler than cc or clang results in unusable output

2010-09-11 Thread O. Hartmann

Dear Sirs,

you see me a kind of desperate. I wrote my own a small piece of  
software in C, calculating the orbit and position of astronomical 
objects, astroids, in a heliocentric coordinate system from Keplerian 
orbital elements. So far. The software calculates the set of points of 
an ellipse based upon ephemeridal datas taken from the Minor Planet 
Cataloge. Again, so far, everything all right. The set of points of an 
orbit is all right and correct. But when it comes to positions at a 
specific time, then I loose hair!


Compiling this piece of software with FreeBSD's gcc (V4.2) and clang 
(clang devel) on my private and lab's FreeBSD boxes (both most recent 
FreeBSD 8.1/amd64), this program does well, the calculated orbital 
positions are very close to professional applications or observational 
checks. But when compiling the sources with gcc44 or gcc45 (same source, 
same CFLAG setting, mostly no CFLAGS set), then there is a great 
discrepancy. Sometimes when plotting positions, the results plotted 
seconds before differs from the most recent. The ellipses are allways 
correct, but the position of a single point at a specific time isn't 
correct.


I use the GNU autotools to build the package.

I suspekt miscompilations in memory alloction or in some time- or 
mathematical functions like sin, cos.


before I digg deeper I'd like to ask the community for some hints how to 
hunt down such a problem.


regards,
Oliver
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling software with different compiler than cc or clang results in unusable output

2010-09-11 Thread Andrew Brampton
On 11 September 2010 10:28, O. Hartmann
ohart...@mail.zedat.fu-berlin.de wrote:

 Dear Sirs,

 you see me a kind of desperate. I wrote my own a small piece of  software in
 C, calculating the orbit and position of astronomical objects, astroids, in
 a heliocentric coordinate system from Keplerian orbital elements. So far.
 The software calculates the set of points of an ellipse based upon
 ephemeridal datas taken from the Minor Planet Cataloge. Again, so far,
 everything all right. The set of points of an orbit is all right and
 correct. But when it comes to positions at a specific time, then I loose
 hair!

 Compiling this piece of software with FreeBSD's gcc (V4.2) and clang (clang
 devel) on my private and lab's FreeBSD boxes (both most recent FreeBSD
 8.1/amd64), this program does well, the calculated orbital positions are
 very close to professional applications or observational checks. But when
 compiling the sources with gcc44 or gcc45 (same source, same CFLAG setting,
 mostly no CFLAGS set), then there is a great discrepancy. Sometimes when
 plotting positions, the results plotted seconds before differs from the most
 recent. The ellipses are allways correct, but the position of a single point
 at a specific time isn't correct.

 I use the GNU autotools to build the package.

 I suspekt miscompilations in memory alloction or in some time- or
 mathematical functions like sin, cos.

 before I digg deeper I'd like to ask the community for some hints how to
 hunt down such a problem.

 regards,
 Oliver

Sounds a cool project. I suspect you are miss-using a feature of C or
are using uninitialised memory, and with gcc44/45's more aggressive
optimisations it is getting it wrong. I have three suggestions

1) Use valgrind to check if it finds anything wrong when running your
program. Check both the good and the bad builds.

2) If your program is made up of multiple C files, then try compiling
all of the C files with gcc42, but just one at a time with gcc44. This
way will help you track down exactly which C file has the bug.

3) Finally do some printf debugging to find the first line of code
that is generating the wrong value.

I hope these suggestions help.
Andrew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling software with different compiler than cc or clang results in unusable output

2010-09-11 Thread Mehmet Erol Sanliturk
On Sat, Sep 11, 2010 at 5:43 AM, Andrew Brampton
brampton+free...@gmail.combrampton%2bfree...@gmail.com
 wrote:

 On 11 September 2010 10:28, O. Hartmann
 ohart...@mail.zedat.fu-berlin.de wrote:
 
  Dear Sirs,
 
  you see me a kind of desperate. I wrote my own a small piece of  software
 in
  C, calculating the orbit and position of astronomical objects, astroids,
 in
  a heliocentric coordinate system from Keplerian orbital elements. So far.
  The software calculates the set of points of an ellipse based upon
  ephemeridal datas taken from the Minor Planet Cataloge. Again, so far,
  everything all right. The set of points of an orbit is all right and
  correct. But when it comes to positions at a specific time, then I loose
  hair!
 
  Compiling this piece of software with FreeBSD's gcc (V4.2) and clang
 (clang
  devel) on my private and lab's FreeBSD boxes (both most recent FreeBSD
  8.1/amd64), this program does well, the calculated orbital positions are
  very close to professional applications or observational checks. But when
  compiling the sources with gcc44 or gcc45 (same source, same CFLAG
 setting,
  mostly no CFLAGS set), then there is a great discrepancy. Sometimes when
  plotting positions, the results plotted seconds before differs from the
 most
  recent. The ellipses are allways correct, but the position of a single
 point
  at a specific time isn't correct.
 
  I use the GNU autotools to build the package.
 
  I suspekt miscompilations in memory alloction or in some time- or
  mathematical functions like sin, cos.
 
  before I digg deeper I'd like to ask the community for some hints how to
  hunt down such a problem.
 
  regards,
  Oliver

 Sounds a cool project. I suspect you are miss-using a feature of C or
 are using uninitialised memory, and with gcc44/45's more aggressive
 optimisations it is getting it wrong. I have three suggestions

 1) Use valgrind to check if it finds anything wrong when running your
 program. Check both the good and the bad builds.

 2) If your program is made up of multiple C files, then try compiling
 all of the C files with gcc42, but just one at a time with gcc44. This
 way will help you track down exactly which C file has the bug.

 3) Finally do some printf debugging to find the first line of code
 that is generating the wrong value.

 I hope these suggestions help.
 Andrew



Another check may be to use Sun Studio C and or Fortran  compilers . These
can be used in Linux ( Linux version of Sun Studio )  and/or OpenSolaris or
Solaris ( Solaris version of SunStudio ( both in x86 , x86_64 , Sparc )  (
all of them are ( Solaris , OpenSolaris , Sun Studio , Linux  )  free ) .
All of them are freely downloadable from www.sun.com and/or
www.opensolaris.com ( these sites or their pages may be redirected to
www.oracle.com owned pages ) .

Personally I tried GCC compilers , but I found that they are very unreliable
. Now I am using Sun Studio compilers in OpenSolaris and Linux , and never
GCC compilers .

Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling software with different compiler than cc or clang results in unusable output

2010-09-11 Thread O. Hartmann

On 09/11/10 11:43, Andrew Brampton wrote:

On 11 September 2010 10:28, O. Hartmann
ohart...@mail.zedat.fu-berlin.de  wrote:


Dear Sirs,

you see me a kind of desperate. I wrote my own a small piece of  software in
C, calculating the orbit and position of astronomical objects, astroids, in
a heliocentric coordinate system from Keplerian orbital elements. So far.
The software calculates the set of points of an ellipse based upon
ephemeridal datas taken from the Minor Planet Cataloge. Again, so far,
everything all right. The set of points of an orbit is all right and
correct. But when it comes to positions at a specific time, then I loose
hair!

Compiling this piece of software with FreeBSD's gcc (V4.2) and clang (clang
devel) on my private and lab's FreeBSD boxes (both most recent FreeBSD
8.1/amd64), this program does well, the calculated orbital positions are
very close to professional applications or observational checks. But when
compiling the sources with gcc44 or gcc45 (same source, same CFLAG setting,
mostly no CFLAGS set), then there is a great discrepancy. Sometimes when
plotting positions, the results plotted seconds before differs from the most
recent. The ellipses are allways correct, but the position of a single point
at a specific time isn't correct.

I use the GNU autotools to build the package.

I suspekt miscompilations in memory alloction or in some time- or
mathematical functions like sin, cos.

before I digg deeper I'd like to ask the community for some hints how to
hunt down such a problem.

regards,
Oliver


Sounds a cool project. I suspect you are miss-using a feature of C or
are using uninitialised memory, and with gcc44/45's more aggressive
optimisations it is getting it wrong. I have three suggestions

1) Use valgrind to check if it finds anything wrong when running your
program. Check both the good and the bad builds.

2) If your program is made up of multiple C files, then try compiling
all of the C files with gcc42, but just one at a time with gcc44. This
way will help you track down exactly which C file has the bug.

3) Finally do some printf debugging to find the first line of code
that is generating the wrong value.

I hope these suggestions help.
Andrew


Hello Andrew.

Thanks for your comments, they are worth trying out. I will do so ...

item 2) oh, yes, a very good idea ...

item 3) I did already, the whole software is built up by those printf's.

The problem boiled down to be some problem in the UNIX time routines. I 
use localtime(3), time(3) and a strftime(3) and strptime(3).


I use a 'wikipedia'-algorithm converting the actual time string into an 
'epoch' used in astronomical calculations. Compiling this routine with 
gcc42 and clang everything is all right, compiling it with gcc44 or 
gcc45 it returns 10 times higher values. I use very 'primitive' cutoffs 
for casting a double value into an int - I need the integrale value, not 
the remainings after the decimal point. I will check this again and look 
forward for a cleaner solution. But isn't this a 'bug'?


I'll try the BETA of the new FreeBSD PathScale compiler if I get some.

Well, I'll report ...

Oliver

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling software with different compiler than cc or clang results in unusable output

2010-09-11 Thread O. Hartmann

On 09/11/10 14:26, Mehmet Erol Sanliturk wrote:



On Sat, Sep 11, 2010 at 5:43 AM, Andrew Brampton
brampton+free...@gmail.com mailto:brampton%2bfree...@gmail.com wrote:

On 11 September 2010 10:28, O. Hartmann
ohart...@mail.zedat.fu-berlin.de
mailto:ohart...@mail.zedat.fu-berlin.de wrote:
 
  Dear Sirs,
 
  you see me a kind of desperate. I wrote my own a small piece of
 software in
  C, calculating the orbit and position of astronomical objects,
astroids, in
  a heliocentric coordinate system from Keplerian orbital elements.
So far.
  The software calculates the set of points of an ellipse based upon
  ephemeridal datas taken from the Minor Planet Cataloge. Again, so
far,
  everything all right. The set of points of an orbit is all right and
  correct. But when it comes to positions at a specific time, then
I loose
  hair!
 
  Compiling this piece of software with FreeBSD's gcc (V4.2) and
clang (clang
  devel) on my private and lab's FreeBSD boxes (both most recent
FreeBSD
  8.1/amd64), this program does well, the calculated orbital
positions are
  very close to professional applications or observational checks.
But when
  compiling the sources with gcc44 or gcc45 (same source, same
CFLAG setting,
  mostly no CFLAGS set), then there is a great discrepancy.
Sometimes when
  plotting positions, the results plotted seconds before differs
from the most
  recent. The ellipses are allways correct, but the position of a
single point
  at a specific time isn't correct.
 
  I use the GNU autotools to build the package.
 
  I suspekt miscompilations in memory alloction or in some time- or
  mathematical functions like sin, cos.
 
  before I digg deeper I'd like to ask the community for some hints
how to
  hunt down such a problem.
 
  regards,
  Oliver

Sounds a cool project. I suspect you are miss-using a feature of C or
are using uninitialised memory, and with gcc44/45's more aggressive
optimisations it is getting it wrong. I have three suggestions

1) Use valgrind to check if it finds anything wrong when running your
program. Check both the good and the bad builds.

2) If your program is made up of multiple C files, then try compiling
all of the C files with gcc42, but just one at a time with gcc44. This
way will help you track down exactly which C file has the bug.

3) Finally do some printf debugging to find the first line of code
that is generating the wrong value.

I hope these suggestions help.
Andrew



Another check may be to use Sun Studio C and or Fortran  compilers .
These can be used in Linux ( Linux version of Sun Studio )Â  and/or
OpenSolaris or Solaris ( Solaris version of SunStudio ( both in x86 ,
x86_64 , Sparc )Â  ( all of them are ( Solaris , OpenSolaris , Sun
Studio , Linux  )  free ) . All of them are freely downloadable from
www.sun.com http://www.sun.com and/or www.opensolaris.com
http://www.opensolaris.com ( these sites or their pages may be
redirected to www.oracle.com http://www.oracle.com owned pages ) .

Personally I tried GCC compilers , but I found that they are very
unreliable . Now I am using Sun Studio compilers in OpenSolaris and
Linux , and never GCC compilers .Â

Thank you very much .

Mehmet Erol Sanliturk



Â


Hello.
Well, the only other architectures I have access to are Linux boxes.

clang ist a very nice compiler since its syntax checking is formidable. 
But its code is slow and there seems no OpenMP support at the moment.


Oliver

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiling software with different compiler than cc or clang results in unusable output

2010-09-11 Thread Mehmet Erol Sanliturk
On Sat, Sep 11, 2010 at 10:05 AM, O. Hartmann 
ohart...@mail.zedat.fu-berlin.de wrote:

 Hello.
 Well, the only other architectures I have access to are Linux boxes.

 clang ist a very nice compiler since its syntax checking is formidable. But
 its code is slow and there seems no OpenMP support at the moment.

 Oliver


The following pages may be useful :

www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-141149.html

www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-136197.html

www.oracle.com/technetwork/server-storage/solarisstudio/documentation/express-june2010-137081.html
( Please notice Support for OpenMP 3.0 features in the C, C++, and Fortran
compilers:  )

This means that you may use Oracle Solaris Studio on Linux  with OpenMP 3.0
support
immediately .

I do not know whether they can be used in FreeBSD as Linux programs or not ,
because I did not study such a  possibility . For me , using Linux directly
is easy .

Thank you very much .


Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: compiler flag -Werror

2010-06-17 Thread akash kumar
Thanks Mark/kitsana for your help.
Its working for me now.

Thanks,
Akash.





From: Mark Tinguely marktingu...@gmail.com
To: CyberLeo Kitsana cyber...@cyberleo.net
Cc: akash kumar akashb...@yahoo.co.in
Sent: Thu, 17 June, 2010 1:21:53 AM
Subject: Re: compiler flag -Werror

CyberLeo Kitsana wrote:
 On 06/16/2010 08:02 AM, akash kumar wrote:
  
 Hi all,
 
 I am working on building a freebsd kernel for mips. As part of this i built 
 cross  tool chain for mips from my host machine(i386).
 After that i was building my kernel using make buildkernel 
 KERNCONF=configfile
 
 I noticed that the compiler flags -Werror is invoked  default with my 
 compiler. I want to remove this flag because all the warning as taken as 
 errors due to which my compilation stops.
 
 Can you please help me how/where to remove this flag.
 
 I have run across this in the past, when building for a VIA C3-2 CPU; so
 I have this in my /etc/make.conf:
 
 # Inline limit warnings?
 # Userland:
 NO_WERROR=yes
 # Kernel: Just turn off inline warnings
 WERROR=-Wno-inline -Werror
 
  
The kernel entry is in /sys/conf/kern.pre.mk

Mark Tinguely



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


compiler flag -Werror

2010-06-16 Thread akash kumar
Hi all,

I am working on building a freebsd kernel for mips. As part of this i built 
cross  tool chain for mips from my host machine(i386).
After that i was building my kernel using make buildkernel KERNCONF=configfile

I noticed that the compiler flags -Werror is invoked  default with my compiler. 
I want to remove this flag because all the warning as taken as errors due to 
which my compilation stops.

Can you please help me how/where to remove this flag. 

Thanks,
Bhanu Prakash.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: compiler flag -Werror

2010-06-16 Thread CyberLeo Kitsana
On 06/16/2010 08:02 AM, akash kumar wrote:
 Hi all,
 
 I am working on building a freebsd kernel for mips. As part of this i built 
 cross  tool chain for mips from my host machine(i386).
 After that i was building my kernel using make buildkernel 
 KERNCONF=configfile
 
 I noticed that the compiler flags -Werror is invoked  default with my 
 compiler. 
 I want to remove this flag because all the warning as taken as errors due to 
 which my compilation stops.
 
 Can you please help me how/where to remove this flag. 

I have run across this in the past, when building for a VIA C3-2 CPU; so
I have this in my /etc/make.conf:

# Inline limit warnings?
# Userland:
NO_WERROR=yes
# Kernel: Just turn off inline warnings
WERROR=-Wno-inline -Werror

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


About cross compiler from x86+redhat to i386+freebsd

2010-06-16 Thread Gmail
Hello, every body,

  I am trying to build a crosscompiler with target as i386 + freebsd(6.5) 
and host as x86+redhat EL 5.3.
I have tried the cross tool of crosstool-0.43 and crosstool-NG. Unfortunately, 
I have not found the two cross tool has the option with target as freebsd. So, 
I want to ask:

1, how to make cross compile chain with crosstool-0.xx or crosstool-NG.

2, did anyone sucessfully build the cross compiler from  x86+redhat to 
i386+freebsd ? I have seen that John Blair try to build the same complier, has 
you done it? 

If you know how to do that, please tell me ,thank you very much!

2010-06-17 



Gmail 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


mingw cross compiler -- cc1 issue

2010-06-09 Thread Malcolm Kay
I have installed mingw32 from ports:-
mingw32-gcc-4.4.0_1,1
mingw32-binutils-2.20,1
mingw32-bin-msvcrt-r3.18.a3.14

OS:-
FreeBSD xi.home 8.0-RELEASE FreeBSD 8.0-RELEASE #0

Running:-
%mingw32-gcc dummy.c
appears to execute without problems, producing a.exe

Running the alternative:-
%/usr/local/mingw32/bin/gcc dummy.c
leads to an error announcing cc1 is not found.

Since /usr/local/mingw32/bin/gcc and /usr/local/bin/mingw32-gcc
are hard linked it would seem that the executable code uses the
calling name to trace its way to cc1 
(/usr/local/libexec/gcc/mingw32/4.4.0/cc1)

Replace /usr/local/mingw32/bin/gcc with a symbolic link to
/usr/local/bin/mingw32-gcc and it seems to work.

Have I missed something in installing mingw32?
Is it not intended that /usr/local/mingw32/bin/gcc should be 
called?
Is there some problem with the port?
Or is there some quite different issue?

Help please,

Malcolm Kay
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


multimedia/ffmpeg fails with internal compiler error

2010-05-31 Thread Eitan Adler
Is this a
a) PEBKAC
b) freeBSD ports error
c) ffmpeg problem
d) compiler problem (as the error seems to be saying)

gcc46 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I. -I/dta/ports/multimedia/ffmpeg/work/ffmpeg-0.5.2 -pipe -mssse3
-mtune=native -O3 -ffast-math -fno-finite-math-only
-fomit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc46
-fno-strict-aliasing -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
-I/usr/local/include/vorbis -I/usr/local/include -std=c99
-fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-switch
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
-O3 -fno-math-errno -fno-signed-zeros  -c -o libavutil/crc.o
libavutil/crc.c
libavutil/crc.c: In function 'av_crc_init':
libavutil/crc.c:58:5: internal compiler error: in predicate_bbs, at
tree-if-conv.c:555
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
gmake: *** [libavutil/crc.o] Error 1
gmake: *** Waiting for unfinished jobs
*** Error code 1

# make showconfig
=== The following configuration options are available for ffmpeg-0.5.2,1:
 AMR_NB=off AMR Narrow Band encoder
 AMR_WB=off AMR Wide Band encoder
 DIRAC=off Dirac codec via libdirac
 FAAC=off FAAC mp4/aac audio encoder
 FAAD=on FAAD mp4/aac audio decoder
 FFSERVER=off Build and install ffserver
 GSM=off GSM audio codec
 IPV6=off IPV6 network support
 LAME=off LAME MP3 encoder
 OPENJPEG=off JPEG 2000 decoder
 OPTIMIZED_CFLAGS=on Additional optimizations
 SCHROEDINGER=off Dirac codec via libschroedinger
 SDL=off SDL support (build ffplay)
 SPEEX=off Speex audio decoder
 SSSE3=on Enable ssse3 support (gcc 4.4+)
 THEORA=on Theora encoder (implies OGG)
 VHOOK=off Video hook support
 VORBIS=on Vorbis encoder via libvorbis (implies OGG)
 X11GRAB=off enable X11 grabbing
 X264=on H.264 encoder
 XVID=on Xvid encoder via xvidcore
=== Use 'make config' to modify these settings

# make -V CC
gcc46
# make -V CFLAGS
-pipe -mssse3 -mtune=native -O3 -ffast-math -fno-finite-math-only
-fomit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc46
-fno-strict-aliasing
# cat /etc/libmap.conf
libgcc_s.so.1   gcc46/libgcc_s.so.1
libgomp.so.1gcc46/libgomp.so.1
libobjc.so.3gcc46/libobjc.so.2
libssp.so.0 gcc46/libssp.so.0
libstdc++.so.6  gcc46/libstdc++.so.6

-- 
Eitan Adler
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: multimedia/ffmpeg fails with internal compiler error

2010-05-31 Thread Roland Smith
On Mon, May 31, 2010 at 05:16:50PM +0300, Eitan Adler wrote:
 Is this a
 a) PEBKAC

Maybe. I don't know how many ports have actually been tested with gcc 4.6. I'm
guessing the ports build cluster uses the base system compiler or the required 
version.

 b) freeBSD ports error

Don't think so. It works fine here.

 c) ffmpeg problem
 d) compiler problem (as the error seems to be saying)

Could be. I recompiled it with gcc-4.4.5.20100518 without problems. So it
could be a bug specific to gcc 4.6.

e) hardware error.

Sometimes these errors are triggered by e.g. bad RAM.

 gcc46 -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
 -I. -I/dta/ports/multimedia/ffmpeg/work/ffmpeg-0.5.2 -pipe -mssse3
 -mtune=native -O3 -ffast-math -fno-finite-math-only
 -fomit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc46
 -fno-strict-aliasing -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
 -I/usr/local/include/vorbis -I/usr/local/include -std=c99
 -fomit-frame-pointer -Wdeclaration-after-statement -Wall -Wno-switch
 -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
 -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef
 -O3 -fno-math-errno -fno-signed-zeros  -c -o libavutil/crc.o
 libavutil/crc.c
 libavutil/crc.c: In function 'av_crc_init':
 libavutil/crc.c:58:5: internal compiler error: in predicate_bbs, at
 tree-if-conv.c:555
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See http://gcc.gnu.org/bugs.html for instructions.
 gmake: *** [libavutil/crc.o] Error 1
 gmake: *** Waiting for unfinished jobs
 *** Error code 1
snip
 gcc46
 # make -V CFLAGS
 -pipe -mssse3 -mtune=native -O3 -ffast-math -fno-finite-math-only

Does removing these cflags make any difference?

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpzg9Y6KzOB0.pgp
Description: PGP signature


Re: multimedia/ffmpeg fails with internal compiler error

2010-05-31 Thread Eitan Adler
On Mon, May 31, 2010 at 8:11 PM, Roland Smith rsm...@xs4all.nl wrote:
 On Mon, May 31, 2010 at 05:16:50PM +0300, Eitan Adler wrote:
 Is this a
 a) PEBKAC

 Maybe. I don't know how many ports have actually been tested with gcc 4.6. I'm
 guessing the ports build cluster uses the base system compiler or the 
 required version.

I've been using gcc46 for a while now and just remove certain ports in
/etc/make.conf

 SSSE3=on Enable ssse3 support (gcc 4.4+)

seems to mean that 4.4+ works.

 d) compiler problem (as the error seems to be saying)

 Could be. I recompiled it with gcc-4.4.5.20100518 without problems. So it
 could be a bug specific to gcc 4.6.

Maybe I will do as the error says and report the error ;)

 e) hardware error.
unlikely: I tested both my RAM and HDD recently. It is also the only
port that has failed with this type of error.

 Sometimes these errors are triggered by e.g. bad RAM.

 Does removing these cflags make any difference?

turning off OPTIMIZED_CFLAGS (but leaving ssse3) does not help.


-- 
Eitan Adler
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bacula 5.0 compiler error (crypto.c)

2010-04-29 Thread Brian A. Seklecki (NOC)
On Mon, 2010-04-26 at 09:48 -0400, Brian A. Seklecki (CFI NOC) wrote:
 On 4/26/2010 9:05 AM, Efren Bravo wrote:
  I've OpenSSL 1.0.0 installed and ports up2date.
 
  My server is on production, so, What do you think I should do in my case?
 
 
 Okay yea you'll need 5.0.1 and a copy of KR or Stevens` APUE to help 
 hold you down. [1]
 

Efren:

5.0.2 was released two days ago and supposedly fixes bugs with ABI/API
breakage in OpenSSL 1.x.

~~BAS

--

This 5.0.2 version is primarily an important bug fix update to version
5.0.1.

Please read the full ReleaseNotes.

Compatibility:
--
 As always, both the Director and Storage daemon must be upgraded at
 the same time.

 Older 5.0.x and 3.0.x File Daemons are compatible with the 5.0.2
 Director and Storage daemons. There should be no need to upgrade older
File
 Daemons.

Changes since 5.0.1
---

Bug fixes
1502 1511 1517 1524 1527 1532 1536 1541 1549 1551 1553 1559 1560

- Probable fix for SD crash bug #1553
- Fix #1559 problem when restoring pruned jobs with a regexp
- Fix for bug #1560 bcopy cannot find Volume
- Fix cancel crash bug #1551
- Check if sql backend is thread-safe
- Correct Pool display in SD status. Fixes bug #1541
- Fix cancel crash reported by Stephen Thompson
- Rewind on close to fix #1549
- Remove closelog() in bpipe fixes bug #1536
- Fix #1517 about missing Base level in .level command
- Replace ASSERT in block.c with fail Job
- Fix database locking calling db_lock and returning from function
without
  calling db_unlock.
- Add missing db_unlock to bvfs_update_cache.
- Fix #1532 about permission on binaries
- Fix #1527 about deadlock during migration
- Another fix for OpenSSLv1
- Add -lrt to Solaris links
- Fix tls.c for OpenSSLv1
- Fix #1511 when trying to insert more than 50.000 directories in bvfs
- Fix plugin load not to stop if one plugin bad -- pointed out by James
- Remove --without-qwt from configure statement.
- Second correct fix to bug #1524 verify fails after adding or removing
files
- Fix bug #1524 verify fails after adding or removing files
- Apply fix suggested by Andreas in bug #1502 for mediaview column sort 
problem
- Fix OpenSSL 1.x problem in crypto.c on Fedora 12
- Display AllowCompress warning message only if compression used in
FileSet

Thanks for using Bacula   :-)



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bacula 5.0 compiler error (crypto.c)

2010-04-29 Thread Efren Bravo
Hi,

I didn't check the releases, so, I have just installed bacula 5.0.1 thanks to 
the patches:

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/144507
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/145642


I'm going to see how to install 5.0.2.

Thanks you for your help.
Bye



--- El jue, 29/4/10, Brian A. Seklecki (NOC) bsekle...@noc.cfi.pgh.pa.us 
escribió:

 De: Brian A. Seklecki (NOC) bsekle...@noc.cfi.pgh.pa.us
 Asunto: Re: Bacula 5.0 compiler error (crypto.c)
 Para: Efren Bravo efre...@yahoo.es
 CC: freeBSD freebsd-questions@freebsd.org
 Fecha: jueves, 29 de abril, 2010 07:50
 On Mon, 2010-04-26 at 09:48 -0400,
 Brian A. Seklecki (CFI NOC) wrote:
  On 4/26/2010 9:05 AM, Efren Bravo wrote:
   I've OpenSSL 1.0.0 installed and ports up2date.
  
   My server is on production, so, What do you think
 I should do in my case?
  
  
  Okay yea you'll need 5.0.1 and a copy of KR or
 Stevens` APUE to help 
  hold you down. [1]
  
 
 Efren:
 
 5.0.2 was released two days ago and supposedly fixes bugs
 with ABI/API
 breakage in OpenSSL 1.x.
 
 ~~BAS
 
 --
 
 This 5.0.2 version is primarily an important bug fix update
 to version
 5.0.1.
 
 Please read the full ReleaseNotes.
 
 Compatibility:
 --
  As always, both the Director and Storage daemon must be
 upgraded at
  the same time.
 
  Older 5.0.x and 3.0.x File Daemons are compatible with the
 5.0.2
  Director and Storage daemons. There should be no need to
 upgrade older
 File
  Daemons.
 
 Changes since 5.0.1
 ---
 
 Bug fixes
 1502 1511 1517 1524 1527 1532 1536 1541 1549 1551 1553 1559
 1560
 
 - Probable fix for SD crash bug #1553
 - Fix #1559 problem when restoring pruned jobs with a
 regexp
 - Fix for bug #1560 bcopy cannot find Volume
 - Fix cancel crash bug #1551
 - Check if sql backend is thread-safe
 - Correct Pool display in SD status. Fixes bug #1541
 - Fix cancel crash reported by Stephen Thompson
 - Rewind on close to fix #1549
 - Remove closelog() in bpipe fixes bug #1536
 - Fix #1517 about missing Base level in .level command
 - Replace ASSERT in block.c with fail Job
 - Fix database locking calling db_lock and returning from
 function
 without
   calling db_unlock.
 - Add missing db_unlock to bvfs_update_cache.
 - Fix #1532 about permission on binaries
 - Fix #1527 about deadlock during migration
 - Another fix for OpenSSLv1
 - Add -lrt to Solaris links
 - Fix tls.c for OpenSSLv1
 - Fix #1511 when trying to insert more than 50.000
 directories in bvfs
 - Fix plugin load not to stop if one plugin bad -- pointed
 out by James
 - Remove --without-qwt from configure statement.
 - Second correct fix to bug #1524 verify fails after adding
 or removing
 files
 - Fix bug #1524 verify fails after adding or removing
 files
 - Apply fix suggested by Andreas in bug #1502 for mediaview
 column sort 
 problem
 - Fix OpenSSL 1.x problem in crypto.c on Fedora 12
 - Display AllowCompress warning message only if compression
 used in
 FileSet
 
 Thanks for using Bacula   :-)
 
 
 
 ___
 freebsd-questions@freebsd.org
 mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bacula 5.0 compiler error (crypto.c)

2010-04-26 Thread Efren Bravo


 De: Brian A. Seklecki (NOC) bsekle...@noc.cfi.pgh.pa.us
 Asunto: Re: Bacula 5.0 compiler error (crypto.c)
 Para: Efren Bravo efre...@yahoo.es
 CC: freeBSD freebsd-questions@freebsd.org
 Fecha: sábado, 24 de abril, 2010 09:57
 
  crypto.c: In function 'ASN1_OCTET_STRING*
 openssl_cert_keyid(X509*)':
  crypto.c:333: error: invalid conversion from 'const
 X509V3_EXT_METHOD*' to 'X509V3_EXT_METHOD*'
  crypto.c: In function 'CRYPTO_SESSION*
 crypto_session_new(crypto_cipher_t, alist*)':
 
 
 What's your uname -a look like?  -current?

FreeBSD dhlgw.dhl.cu 7.2-RELEASE-p4
 
 5.0.1 was a patch release for version of GNU/Linux that had
 recent
 OpenSSL versions?
 
 For example, 5.0.1 wouldn't compile on RHEL5/Fedora12, but
 5.0.1 may be
 required for FreeBSD -current with OpenSSL 0.9.8n+ in
 -current

I've OpenSSL 1.0.0 installed and ports up2date.

My server is on production, so, What do you think I should do in my case?


Thank u very mucho for answer.

 ~BAS
 
  crypto.c:1102: error: cannot convert 'unsigned char*'
 to 'EVP_PKEY_CTX*' for argument '1' to 'int
 EVP_PKEY_encrypt(EVP_PKEY_CTX*, unsigned char*, size_t*,
 const unsigned char*, size_t)'
  crypto.c: In function 'crypto_error_t
 crypto_session_decode(const u_int8_t*, u_int32_t, alist*,
 CRYPTO_SESSION**)':
  crypto.c:1226: error: cannot convert 'unsigned char*'
 to 'EVP_PKEY_CTX*' for argument '1' to 'int
 EVP_PKEY_decrypt(EVP_PKEY_CTX*, unsigned char*, size_t*,
 const unsigned char*, size_t)'
  *** Error code 1
 
 
 ___
 freebsd-questions@freebsd.org
 mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
 



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bacula 5.0 compiler error (crypto.c)

2010-04-26 Thread Brian A. Seklecki (CFI NOC)

On 4/26/2010 9:05 AM, Efren Bravo wrote:

I've OpenSSL 1.0.0 installed and ports up2date.

My server is on production, so, What do you think I should do in my case?



Okay yea you'll need 5.0.1 and a copy of KR or Stevens` APUE to help 
hold you down. [1]


~BAS

1. Down under water, until the thrashing stops.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Bacula 5.0 compiler error (crypto.c)

2010-04-24 Thread Brian A. Seklecki (NOC)

 crypto.c: In function 'ASN1_OCTET_STRING* openssl_cert_keyid(X509*)':
 crypto.c:333: error: invalid conversion from 'const X509V3_EXT_METHOD*' to 
 'X509V3_EXT_METHOD*'
 crypto.c: In function 'CRYPTO_SESSION* crypto_session_new(crypto_cipher_t, 
 alist*)':


What's your uname -a look like?  -current?

5.0.1 was a patch release for version of GNU/Linux that had recent
OpenSSL versions?

For example, 5.0.1 wouldn't compile on RHEL5/Fedora12, but 5.0.1 may be
required for FreeBSD -current with OpenSSL 0.9.8n+ in -current

~BAS

 crypto.c:1102: error: cannot convert 'unsigned char*' to 'EVP_PKEY_CTX*' for 
 argument '1' to 'int EVP_PKEY_encrypt(EVP_PKEY_CTX*, unsigned char*, size_t*, 
 const unsigned char*, size_t)'
 crypto.c: In function 'crypto_error_t crypto_session_decode(const u_int8_t*, 
 u_int32_t, alist*, CRYPTO_SESSION**)':
 crypto.c:1226: error: cannot convert 'unsigned char*' to 'EVP_PKEY_CTX*' for 
 argument '1' to 'int EVP_PKEY_decrypt(EVP_PKEY_CTX*, unsigned char*, size_t*, 
 const unsigned char*, size_t)'
 *** Error code 1


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Bacula 5.0 compiler error (crypto.c)

2010-04-19 Thread Efren Bravo
Hi there,

I'm trying to install bacula server from /usr/ports/sysutils/bacula-server and 
make install aborts with the message:


===  Building for bacula-server-5.0.0
==Entering directory /usr/ports/sysutils/bacula-server/work/bacula-5.0.0/src
==Entering directory 
/usr/ports/sysutils/bacula-server/work/bacula-5.0.0/scripts
==Entering directory 
/usr/ports/sysutils/bacula-server/work/bacula-5.0.0/src/lib
Compiling crypto.c
crypto.c: In function 'ASN1_OCTET_STRING* openssl_cert_keyid(X509*)':
crypto.c:333: error: invalid conversion from 'const X509V3_EXT_METHOD*' to 
'X509V3_EXT_METHOD*'
crypto.c: In function 'CRYPTO_SESSION* crypto_session_new(crypto_cipher_t, 
alist*)':
crypto.c:1102: error: cannot convert 'unsigned char*' to 'EVP_PKEY_CTX*' for 
argument '1' to 'int EVP_PKEY_encrypt(EVP_PKEY_CTX*, unsigned char*, size_t*, 
const unsigned char*, size_t)'
crypto.c: In function 'crypto_error_t crypto_session_decode(const u_int8_t*, 
u_int32_t, alist*, CRYPTO_SESSION**)':
crypto.c:1226: error: cannot convert 'unsigned char*' to 'EVP_PKEY_CTX*' for 
argument '1' to 'int EVP_PKEY_decrypt(EVP_PKEY_CTX*, unsigned char*, size_t*, 
const unsigned char*, size_t)'
*** Error code 1

Stop in /usr/ports/sysutils/bacula-server/work/bacula-5.0.0/src/lib.


  == Error in /usr/ports/sysutils/bacula-server/work/bacula-5.0.0/src/lib 
==


*** Error code 1

Stop in /usr/ports/sysutils/bacula-server/work/bacula-5.0.0.
*** Error code 1

Stop in /usr/ports/sysutils/bacula-server.
*** Error code 1

Stop in /usr/ports/sysutils/bacula-server.


Do you know a solution to this?

thanx in advance.
Efren



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-03 Thread Aaron Lewis

[r...@meilk /usr/src/sys/i386/compile/AARON]# make
CC='cc' make -f ../../../dev/aic7xxx/aicasm/Makefile 
MAKESRCPATH=../../../dev/aic7xxx/aicasm
Warning: Object directory not changed from original 
/usr/src/sys/i386/compile/AARON
cc -O2 -pipe -march=i686 -ffast-math -mfpmath=sse -O3  -nostdinc 
-I/usr/include -I. -I../../../dev/aic7xxx/aicasm -std=gnu99 
-fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W 
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch 
-Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wno-pointer-sign -c 
../../../dev/aic7xxx/aicasm/aicasm.c

cc1: warnings being treated as errors
../../../dev/aic7xxx/aicasm/aicasm.c:1: warning: SSE instruction set 
disabled, using 387 arithmetics

*** Error code 1


It's interesting something can work with SSE instruction , while some 
are not ,


Warnings are treated as errors , if we can safely disable it in some 
specific occasions.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-03 Thread Giorgos Keramidas
On Tue, 2 Mar 2010 23:26:20 +0200, Dan Naumov dan.nau...@gmail.com wrote:
See the section 3.17.14 Intel 386 and AMD x86-64 Options in the gcc
Info manual.  It contains a full list of the supported CPU-TYPE values
for the -mtune=CPU-TYPE option.  The -march=CPU-TYPE option accepts the
same CPU types:

`-march=CPU-TYPE'
 Generate instructions for the machine type CPU-TYPE.  The
 choices for CPU-TYPE are the same as for `-mtune'.  Moreover,
 specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.

 Hello
 Out of curiosity, what is the optimal -march= value to use for the
 new Atom D510 CPU: http://ark.intel.com/Product.aspx?id=43098 ?

I'm not sure.  'nocona' seems a pretty close match:

_nocona_
  Improved version of Intel Pentium4 CPU with 64-bit
  extensions, MMX, SSE, SSE2 and SSE3 instruction set
  support.

Without actually trying -march=nocona on one of these I can't
tell for sure if it is 'optimal' or not though.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-03 Thread Chuck Swiger

Aaron Lewis wrote:

[r...@meilk /usr/src/sys/i386/compile/AARON]# make
CC='cc' make -f ../../../dev/aic7xxx/aicasm/Makefile 
MAKESRCPATH=../../../dev/aic7xxx/aicasm
Warning: Object directory not changed from original 
/usr/src/sys/i386/compile/AARON

cc -O2 -pipe -march=i686 -ffast-math -mfpmath=sse -O3

[ ... ]

cc1: warnings being treated as errors
../../../dev/aic7xxx/aicasm/aicasm.c:1: warning: SSE instruction set 
disabled, using 387 arithmetics

*** Error code 1


It's interesting something can work with SSE instruction , while some 
are not , Warnings are treated as errors , if we can safely disable it in some 
specific occasions.


Dude, the FreeBSD kernel doesn't use floating point, MMX, or SSE.  See 
sys/conf/kern.mk:


# [ ... ]  Explicitly prohibit the use of SSE and other SIMD
# operations inside the kernel itself.  These operations are exclusively
# reserved for user applications.
#
.if ${MACHINE_ARCH} == i386  ${CC} != icc
CFLAGS+=-mno-align-long-strings -mpreferred-stack-boundary=2 \
-mno-mmx -mno-3dnow -mno-sse -mno-sse2
INLINE_LIMIT?=  8000
.endif

Trying to override the default compiler flags to force it to use SSE is simply 
not going to work.


--
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


[SOLVED] Compiler Flags problem with core2 CPU

2010-03-02 Thread Aaron Lewis

James Phillips wrote:
I laughed at your question because I remember reading somewhere that using aggressive optimization options is a good way to find compiler bugs. I think that extends of optimizations for new CPU architectures as well. 
I also heard kernel code avoids MMX instructions for some reason: it may have to do with interrupt handling (fewer registers=faster?). x86 (and AMD64) processors are backwards compatible, so you don't strictly need the latest instructions.


Regards,

James Phillips
Ah , i've just read it may not be safe to use MMX and SSE instructions 
in kernel code.

So my CFLAGS is much too agressive , i'll notice this.

Thank you all.

--

Best Regards,
Aaron Lewis - PGP: 0xA476D2E9
irc: A4r0n on freenode

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-02 Thread Giorgos Keramidas
On Sun, 28 Feb 2010 20:38:45 +0800, Aaron Lewis aaron.lewis1...@gmail.com 
wrote:
 Hi,
I gonna recompile kernel for my core2 CPU , so i'd like to pass some
 flags to gcc.
Kinds of -march=core2 , i tried to modify /etc/make.conf
e.gCFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
But it fails .. bad arch switch , core2 cpu is not supported ?

And is that useful to let gcc select cpu specified asm code ?

See the section 3.17.14 Intel 386 and AMD x86-64 Options in the gcc
Info manual.  It contains a full list of the supported CPU-TYPE values
for the -mtune=CPU-TYPE option.  The -march=CPU-TYPE option accepts the
same CPU types:

`-march=CPU-TYPE'
 Generate instructions for the machine type CPU-TYPE.  The
 choices for CPU-TYPE are the same as for `-mtune'.  Moreover,
 specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-02 Thread Giorgos Keramidas
On Sun, 28 Feb 2010 22:37:27 +0800, Aaron Lewis aaron.lewis1...@gmail.com 
wrote:
Paul B Mahol wrote:
On 2/28/10, Aaron Lewis aaron.lewis1...@gmail.com wrote:
 Hi,
 I gonna recompile kernel for my core2 CPU , so i'd like to pass some
 flags to gcc.  Kinds of -march=core2 , i tried to modify
 /etc/make.conf

 e.gCFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
 But it fails .. bad arch switch , core2 cpu is not supported ?

 It is bad idea to compile kernel with custom flags. And gcc in FreeBSD
 doesn't know about core2,
 use 'native' if you must.


 And is that useful to let gcc select cpu specified asm code ?

 Only for some userland stuff like openssl.

 Really ? It's bad to use custom flags to compile kernel , why do you
 think so ?  I'd like to know more about this : )

 So setting optimize compiler flags is only useful for userland stuff ?

Please do not post your reply on *top* of the original text to this
list.  The preferred form of replying is bottom-posting here (other
lists may have their own rules, but that's ok).  I've fixed this message
manually, but it would be nice if you posted your reply to the bottom of
the quoted text.

You can definitely *try* using optimizations for the kernel too.  The
FreeBSD developers and other users cannot _force_ you to use only a very
limited set of options.  You are more than free to try new things.  This
is precisely the reason why we make the source tree available to
everyone, including detailed instructions for rebuilding the entire
system from source.

Note that the kernel is a very special program that may or may not work
with some of the optimizations performed by higher GCC levels, though.
There may be problems, so if you start building optimized kernels please
make sure you keep a 'safe' backup copy of /boot/kernel before you
install a new one.  This way you will at least be able to boot into the
old kernel if anything breaks.

One way to keep a backup copy of the kernel is to make sure your /boot
partition has enough free space and type as root:

# cp -a /boot/kernel /boot/kernel.safe

Then if anything goes wrong, you can always break into the loader prompt
and type:

boot unload

boot set module_path=/boot/kernel.safe;/boot/modules

boot load kernel

boot boot -s

Note that any optimization levels higher than the defaults are not
'supported' by the FreeBSD team though.  As the warning in make.conf
says [/usr/share/examples/etc/make.conf]:

  # CFLAGS controls the compiler settings used when compiling C code.
  # Note that optimization settings other than -O and -O2 are not recommended
  # or supported for compiling the world or the kernel - please revert any
  # nonstandard optimization settings to -O or -O2 -fno-strict-aliasing
  # before submitting bug reports without patches to the developers.

So if you start building highly-optimized kernels and userland binaries,
you are on your own.  Bumping in any problem will require that you
revert to the standard optimization flags, rebuild everything, try to
reproduce the problem again and *then* report it.

- Giorgos

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Compiler Flags problem with core2 CPU

2010-03-02 Thread Dan Naumov
See the section 3.17.14 Intel 386 and AMD x86-64 Options in the gcc
Info manual.  It contains a full list of the supported CPU-TYPE values
for the -mtune=CPU-TYPE option.  The -march=CPU-TYPE option accepts the
same CPU types:

`-march=CPU-TYPE'
 Generate instructions for the machine type CPU-TYPE.  The
 choices for CPU-TYPE are the same as for `-mtune'.  Moreover,
 specifying `-march=CPU-TYPE' implies `-mtune=CPU-TYPE'.


Hello

Out of curiosity, what is the optimal -march= value to use for the
new Atom D510 CPU: http://ark.intel.com/Product.aspx?id=43098 ?

Thanks


- Sincerely,
Dan Naumov
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-02 Thread ill...@gmail.com
On 28 February 2010 07:38, Aaron Lewis aaron.lewis1...@gmail.com wrote:
 Hi,
   I gonna recompile kernel for my core2 CPU , so i'd like to pass some flags
 to gcc.
   Kinds of -march=core2 , i tried to modify /etc/make.conf
     e.g    CFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
   But it fails .. bad arch switch , core2 cpu is not supported ?

Just so you know -O20 is the same as saying -O3.

I don't think everything in base is safe for -ffast-math,
but setting it in make.conf will surely test that.

-O2 is already turned on almost everywhere by default,
so also, I believe, with -fomit-frame-pointer.  The only
thing I've ever found to be remotely useful to change
was -Os on an old, space-restricted machine.  But
last time I tried -Os on amd64 it broke.  Badly.

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-03-01 Thread James Phillips


 Date: Sun, 28 Feb 2010 22:37:27 +0800
 From: Aaron Lewis aaron.lewis1...@gmail.com
 Subject: Re: Compiler Flags problem with core2 CPU
 To: Paul B Mahol one...@gmail.com
 Cc: freebsd-questions@freebsd.org
 Message-ID: 4b8a7fa7.1070...@gmail.com
 Content-Type: text/plain; charset=ISO-8859-1;
 format=flowed
 
 Really ? It's bad to use custom flags to compile kernel ,
 why do you 
 think so ?
 I'd like to know more about this : )
 
 So setting optimize compiler flags is only useful for
 userland stuff ?
 
I laughed at your question because I remember reading somewhere that using 
aggressive optimization options is a good way to find compiler bugs. I think 
that extends of optimizations for new CPU architectures as well. 
I also heard kernel code avoids MMX instructions for some reason: it may have 
to do with interrupt handling (fewer registers=faster?). x86 (and AMD64) 
processors are backwards compatible, so you don't strictly need the latest 
instructions.

Regards,

James Phillips






  __
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Compiler Flags problem with core2 CPU

2010-02-28 Thread Aaron Lewis

Hi,
   I gonna recompile kernel for my core2 CPU , so i'd like to pass some 
flags to gcc.

   Kinds of -march=core2 , i tried to modify /etc/make.conf
  
   e.gCFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse

   But it fails .. bad arch switch , core2 cpu is not supported ?

   And is that useful to let gcc select cpu specified asm code ?

--
Best Regards,
Aaron Lewis - PGP: 0xA476D2E9
irc: A4r0n on freenode

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-02-28 Thread Paul B Mahol
On 2/28/10, Aaron Lewis aaron.lewis1...@gmail.com wrote:
 Hi,
 I gonna recompile kernel for my core2 CPU , so i'd like to pass some
 flags to gcc.
 Kinds of -march=core2 , i tried to modify /etc/make.conf

 e.gCFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
 But it fails .. bad arch switch , core2 cpu is not supported ?
It is bad idea to compile kernel with custom flags. And gcc in FreeBSD
doesn't know about core2,
use 'native' if you must.


 And is that useful to let gcc select cpu specified asm code ?

Only for some userland stuff like openssl.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-02-28 Thread Aaron Lewis
Really ? It's bad to use custom flags to compile kernel , why do you 
think so ?

I'd like to know more about this : )

So setting optimize compiler flags is only useful for userland stuff ?

Paul B Mahol wrote:

On 2/28/10, Aaron Lewis aaron.lewis1...@gmail.com wrote:
  

Hi,
I gonna recompile kernel for my core2 CPU , so i'd like to pass some
flags to gcc.
Kinds of -march=core2 , i tried to modify /etc/make.conf

e.gCFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
But it fails .. bad arch switch , core2 cpu is not supported ?


It is bad idea to compile kernel with custom flags. And gcc in FreeBSD
doesn't know about core2,
use 'native' if you must.

  

And is that useful to let gcc select cpu specified asm code ?



Only for some userland stuff like openssl.
  



--
Best Regards,
Aaron Lewis - PGP: 0xA476D2E9
irc: A4r0n on freenode

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Compiler Flags problem with core2 CPU

2010-02-28 Thread Paul B Mahol
Do not top post.

On 2/28/10, Aaron Lewis aaron.lewis1...@gmail.com wrote:
 Really ? It's bad to use custom flags to compile kernel , why do you
 think so ?
 I'd like to know more about this : )

Use google.

 So setting optimize compiler flags is only useful for userland stuff ?

 Paul B Mahol wrote:
 On 2/28/10, Aaron Lewis aaron.lewis1...@gmail.com wrote:

 Hi,
 I gonna recompile kernel for my core2 CPU , so i'd like to pass some
 flags to gcc.
 Kinds of -march=core2 , i tried to modify /etc/make.conf

 e.gCFLAGS += -march=core2 -O20 -ffast-math -mfpmath=sse
 But it fails .. bad arch switch , core2 cpu is not supported ?

 It is bad idea to compile kernel with custom flags. And gcc in FreeBSD
 doesn't know about core2,
 use 'native' if you must.


 And is that useful to let gcc select cpu specified asm code ?


 Only for some userland stuff like openssl.



 --
 Best Regards,
 Aaron Lewis - PGP: 0xA476D2E9
 irc: A4r0n on freenode


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


compiler flags

2010-02-28 Thread Jerry
I am attempting to redo a Gateway GT5220 PC. The CPU is recognized as:

CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (2009.16-MHz 686-class CPU)

Now, would it be advantageous to set the CPU type in the
'/etc/make.conf' and possibly '/etc/src.conf' files.

According to the /usr/share/examples/etc/make.conf file, this is
probably what I want:

CPUTYPE=athlon64

I am assuming that the FreeBSD 'make' does not support 'native'. The
version of 'gcc': gcc (GCC) 4.2.1 20070719  [FreeBSD]

-- 
Jerry
ges...@yahoo.com

|===
|===
|===
|===
|

The Ancient Doctrine of Mind Over Matter:
I don't mind... and you don't matter.

As revealed to reporter G. Rivera by Swami Havabanana

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: compiler flags

2010-02-28 Thread Bruce Cran
On Sunday 28 February 2010 15:31:55 Jerry wrote:
 I am attempting to redo a Gateway GT5220 PC. The CPU is recognized as:
 
 CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (2009.16-MHz 686-class
  CPU)
 
 Now, would it be advantageous to set the CPU type in the
 '/etc/make.conf' and possibly '/etc/src.conf' files.

I'd guess that since amd64 is a relatively new platform there shouldn't be 
much advantage to specifying the CPUTYPE. On i386 there's a huge difference 
between an i486 and core2 so it can make sense to specify the CPU, but there's 
much less difference between the various amd64 CPUs.

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


cross compiler for x86_64 freebsd

2010-01-12 Thread john blair
I am trying to build a crosscompiler (gcc-4.1.2, binutils-2.15, freebsd-8.0)
with target as x86_64-freebsd and host as i686-linux. Everything builds 
successfully but compiler-assist libraries (libgcc_s, libstdc++, etc.) are
Linux library, not a FreeBSD one.
$ file gcc-4.1.2/x86_64-freebsd8.0/lib/libstdc++.so.6.8
gcc-4.1.2/x86_64-freebsd8.0/lib/libstdc++.so.6.8: ELF 64-bit LSB shared object, 
x86-64, version 1 (SYSV), dynamically linked, stripped

If I build with binutils-2.17.50.15 everything is fine.
$ file gcc-4.1.2/x86_64-freebsd8.0/lib/libstdc++.so.6.8
gcc-4.1.2/x86_64-freebsd8.0/lib/libstdc++.so.6.8: ELF 64-bit LSB shared object, 
x86-64, version 1 (FreeBSD), dynamically linked, stripped

Same is the case for freebsd6.0,6.3




  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-17 Thread Gilles
On Mon, 16 Feb 2009 11:32:46 -0900, Mel
fbsd.questi...@rachie.is-a-geek.net wrote:
If you have none in /etc/make.conf that's a good start.
If it still fails, then make sure BUILD_OPTIMIZED is unset.
Also comment any CPUTYPE variables in /etc/make.conf.

Thanks again. I'm not really a developper, and don't know quite how to
solve this.

Here's what's in /etc/make.conf:

PERL_VER=5.8.8
PERL_VERSION=5.8.8

How should I tell gcc to compile for either a PIII processor, or just
plain i386?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-17 Thread Gilles
On Tue, 17 Feb 2009 09:45:40 +0100, Gilles gilles.gana...@free.fr
wrote:
How should I tell gcc to compile for either a PIII processor, or just
plain i386?

BTW, here are the CFLAGS-related lines MySQL Server's Makefile:

.if defined(WITH_LINUXTHREADS)
CFLAGS+=-D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE
CFLAGS+=-I${LOCALBASE}/include/pthread/linuxthreads
.else
CFLAGS+=${PTHREAD_CFLAGS}
.endif

.if defined(BUILD_OPTIMIZED)
CFLAGS+=-O3 -fno-omit-frame-pointer
CFLAGS+=-fno-gcse
.endif

.if defined(WITHOUT_THR_ALARM)
CFLAGS+=-DDONT_USE_THR_ALARM
.endif

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-17 Thread Gilles
On Tue, 17 Feb 2009 09:53:09 +0100, Gilles gilles.gana...@free.fr
wrote:
BTW, here are the CFLAGS-related lines MySQL Server's Makefile:

Using make BUILD_OPTIMIZED=no doesn't solve the issue :-/

In file included from item.h:2199,
 from mysql_priv.h:589,
 from ha_berkeley.cc:53:
item_geofunc.h:78: internal compiler error: Illegal instruction: 4

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-17 Thread Ivan Voras
Gilles wrote:
 On Tue, 17 Feb 2009 09:53:09 +0100, Gilles gilles.gana...@free.fr
 wrote:
 BTW, here are the CFLAGS-related lines MySQL Server's Makefile:
 
 Using make BUILD_OPTIMIZED=no doesn't solve the issue :-/
 
 In file included from item.h:2199,
  from mysql_priv.h:589,
  from ha_berkeley.cc:53:
 item_geofunc.h:78: internal compiler error: Illegal instruction: 4

Ok, there are two more possibilities:
a) Your hardware has problems (try http://www.memtest86.com/)
b) Your compiler was itself compiled with invalid optimizations. This
is only possible if you or someone else compiled the system for you, not
if you simply installed it from released ISO images.



signature.asc
Description: OpenPGP digital signature


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-17 Thread Mel
On Tuesday 17 February 2009 01:09:34 Ivan Voras wrote:
 Gilles wrote:
  On Tue, 17 Feb 2009 09:53:09 +0100, Gilles gilles.gana...@free.fr
 
  wrote:
  BTW, here are the CFLAGS-related lines MySQL Server's Makefile:
 
  Using make BUILD_OPTIMIZED=no doesn't solve the issue :-/
 
  In file included from item.h:2199,
   from mysql_priv.h:589,
   from ha_berkeley.cc:53:
  item_geofunc.h:78: internal compiler error: Illegal instruction: 4

 Ok, there are two more possibilities:
   a) Your hardware has problems (try http://www.memtest86.com/)
   b) Your compiler was itself compiled with invalid optimizations. This
 is only possible if you or someone else compiled the system for you, not
 if you simply installed it from released ISO images.

c) UNAME_m environment variable is set to not i386

Would be nice to see the final compilation line this fails on, so the very 
long line above the In file included one. If there are no cpu specific 
selections there, then the compiler itself is at fault. Yes, hardware is a 
possibility, but I'd expect to see SIGSEGV much much sooner then SIGILL.
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


[6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-16 Thread Gilles
Hello

I updated the Ports collection on this 6.3 host, but it fails
compiling MySQL Server 5.1:

===
In file included from item.h:2428,
 from mysql_priv.h:749,
 from sql_profile.cc:32:
item_cmpfunc.h:1301: internal compiler error: Illegal instruction: 4
Please submit a full bug report,
with preprocessed source if appropriate.
===

Has someone seen this, and knows a work-around?

Thank you.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-16 Thread Ivan Voras
Gilles wrote:
 Hello
 
 I updated the Ports collection on this 6.3 host, but it fails
 compiling MySQL Server 5.1:
 
 ===
 In file included from item.h:2428,
  from mysql_priv.h:749,
  from sql_profile.cc:32:
 item_cmpfunc.h:1301: internal compiler error: Illegal instruction: 4
 Please submit a full bug report,
 with preprocessed source if appropriate.
 ===
 
 Has someone seen this, and knows a work-around?

If you have any CFLAGS set (the most common are those for CPU
optimizations), disable them and try again.



signature.asc
Description: OpenPGP digital signature


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-16 Thread Gilles
On Mon, 16 Feb 2009 15:12:59 +0100, Ivan Voras ivo...@freebsd.org
wrote:
If you have any CFLAGS set (the most common are those for CPU
optimizations), disable them and try again.

Thanks for the tip. Do you know which value I should set for this
switch, if at all?

# dmesg | grep -i CPU
CPU: Intel Pentium III (994.63-MHz 686-class CPU)
cpu0: ACPI CPU on acpi0
acpi_throttle0: ACPI CPU Throttling on cpu0

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: [6.3/MySQL Server 5.1] item_cmpfunc.h:1301: internal compiler error

2009-02-16 Thread Mel
On Monday 16 February 2009 05:46:01 Gilles wrote:
 On Mon, 16 Feb 2009 15:12:59 +0100, Ivan Voras ivo...@freebsd.org

 wrote:
 If you have any CFLAGS set (the most common are those for CPU
 optimizations), disable them and try again.

 Thanks for the tip. Do you know which value I should set for this
 switch, if at all?

 # dmesg | grep -i CPU
 CPU: Intel Pentium III (994.63-MHz 686-class CPU)
 cpu0: ACPI CPU on acpi0
 acpi_throttle0: ACPI CPU Throttling on cpu0

If you have none in /etc/make.conf that's a good start.
If it still fails, then make sure BUILD_OPTIMIZED is unset.
Also comment any CPUTYPE variables in /etc/make.conf.

This particular error stems from having a faulty CPUTYPE detected/set 
somewhere.
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Question about install of Fortran compiler

2009-01-28 Thread Bruce Cran
On Tue, 27 Jan 2009 16:30:11 -0500
V. M. Tame-Reyes mt...@instec.cu wrote:

 
 Hello FreeBSD community,
 
 I had a friend download all the files in freeBSD ports site
 (the official one) so i have a large collection of .tbz files
 but i don't seem to be able to find a correct fortran 77
 compiler, i already installed c compiler, but calling g77
 wouldn't work.
 
 Any help anyone could provide ?

With the import of GCC 4.2 the Fortran compiler was removed from the
base system a few versions ago.  There are several in the ports system
you can install instead.

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Question about install of Fortran compiler

2009-01-27 Thread V. M. Tame-Reyes


Hello FreeBSD community,

I had a friend download all the files in freeBSD ports site
(the official one) so i have a large collection of .tbz files
but i don't seem to be able to find a correct fortran 77
compiler, i already installed c compiler, but calling g77
wouldn't work.

Any help anyone could provide ?

Best regards,

--
Victor Tame

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Question about install of Fortran compiler

2009-01-27 Thread Tom Everett
The FreeBSD ports tree has a number of Fortran compilers in the ports 
collection:


http://www.freebsd.org/ports/lang.html

To install one from the ports collection, su to root and then install 
the port.


For example to install G95 
(http://www.freebsd.org/cgi/url.cgi?ports/lang/g95/pkg-descr)


cd /usr/ports/lang/g96
make
make test
make install






V. M. Tame-Reyes wrote:


Hello FreeBSD community,

I had a friend download all the files in freeBSD ports site
(the official one) so i have a large collection of .tbz files
but i don't seem to be able to find a correct fortran 77
compiler, i already installed c compiler, but calling g77
wouldn't work.

Any help anyone could provide ?

Best regards,

--
Victor Tame

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to 
freebsd-questions-unsubscr...@freebsd.org


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gcc cross-compiler for linux

2008-11-27 Thread Lowell Gilbert
Xavier Otazu [EMAIL PROTECTED] writes:

 Thanks a lot for this link. Now I see that I need to use the
 cross-gcc compiler.

I've never done it; I just looked it up.  

I'm sure there's more information in the archives of the mailing lists,
and you can always try to consult the port maintainer.

 I am using Matlab inside the linux emulator, and I nedd to create some
 mex files from matlab. In order to create these mes files, matlab
 needs access to a gcc compiler that produces linux elf files. I think I
 cannot use the gentoo-stage3 port, because in order to use I would need
 to chroot and it is not so easy from matlab. Also, when using this
 compiler I should be able to acces to the linux-matlab header files,
 but if I chroot to the gentoo port I won't be able to access them.

They should be inside the compat/linux tree, and therefore accessible.

 I tried to install the devel/cross-gcc port, but I get errors when
 compiling it.

Um, fix the errors?

 I have some doubts about the wiki link you sent me:

 1) What really means null-mount the home directory? I google-d some
 info, but I didn't find good information. What really exactly means
 corresponding entries in the passwd and shadow files are required
 then?

a) man mount_nullfs

b) I would guess that /compat/linux/etc/{passwd,shadow} need to have
   entries to match your /etc/master.passwd.  I can't check for sure 

 2) What really means All you have to do is to compile the ports and
 add includes and libs from the linux system your target in your
 development? Do I have to include the linux headers during
 devel/cross-gcc port building? Or do I have to include them when
 cross-compiling my code?

Logically, I would think that would apply to compiling *your* code.
Anything that's need to build the port should be handled by the port
itself.  

 What options do I have to use when building the linux gcc
 cross-compiler? I use 

I don't know; all I can tell you is that you seem to be on the right
path here.

 make TGTARCH=i386 TGTABI=linux install clean

 Thanks a lot for your help

 Cheers

 Xavier

 On Tue, 25 Nov 2008 15:04:27 -0500
 Lowell Gilbert [EMAIL PROTECTED] wrote:

 Xavier Otazu [EMAIL PROTECTED] writes:
 
  I would like to compile a C++ code to be executed within the linux
  emulator.
 
 http://wiki.freebsd.org/linux-xdev

Good luck.
-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gcc cross-compiler for linux

2008-11-27 Thread Tijl Coosemans
On Wednesday 26 November 2008 18:48:39 Xavier Otazu wrote:
 On Tue, 25 Nov 2008 23:31:10 +0100 Tijl Coosemans [EMAIL PROTECTED] wrote:
 From that error message I'd say you probably need to populate
 /usr/local/i386-linux/include with glibc and linux kernel headers.
 
 How can I populate it with them? Manually installing them in this
 directory? May be the devel/cross-binutils port should do it? Is there
 any port that can populate it?

I don't think there's a port. I'd start with a glibc-headers
and kernel-headers RPM from the linux_base port you've installed.

http://rpmfind.net/linux/rpm2html/search.php?query=glibc-headers
http://rpmfind.net/linux/rpm2html/search.php?query=kernel-headers
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gcc cross-compiler for linux

2008-11-26 Thread Xavier Otazu
On Tue, 25 Nov 2008 23:31:10 +0100
Tijl Coosemans [EMAIL PROTECTED] wrote:


 From that error message I'd say you probably need to populate
 /usr/local/i386-linux/include with glibc and linux kernel headers.

How can I populate it with them? Manually installing them in this
directory? May be the devel/cross-binutils port should do it? Is there
any port that can populate it?

Thanks

Xavier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gcc cross-compiler for linux

2008-11-25 Thread Lowell Gilbert
Xavier Otazu [EMAIL PROTECTED] writes:

 I would like to compile a C++ code to be executed within the linux
 emulator.

http://wiki.freebsd.org/linux-xdev

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gcc cross-compiler for linux

2008-11-25 Thread Xavier Otazu

Lowell,

Thanks a lot for this link. Now I see that I need to use the
cross-gcc compiler.

I am using Matlab inside the linux emulator, and I nedd to create some
mex files from matlab. In order to create these mes files, matlab
needs access to a gcc compiler that produces linux elf files. I think I
cannot use the gentoo-stage3 port, because in order to use I would need
to chroot and it is not so easy from matlab. Also, when using this
compiler I should be able to acces to the linux-matlab header files,
but if I chroot to the gentoo port I won't be able to access them.

I tried to install the devel/cross-gcc port, but I get errors when
compiling it.

I have some doubts about the wiki link you sent me:

1) What really means null-mount the home directory? I google-d some
info, but I didn't find good information. What really exactly means
corresponding entries in the passwd and shadow files are required
then?

2) What really means All you have to do is to compile the ports and
add includes and libs from the linux system your target in your
development? Do I have to include the linux headers during
devel/cross-gcc port building? Or do I have to include them when
cross-compiling my code?

What options do I have to use when building the linux gcc
cross-compiler? I use 

make TGTARCH=i386 TGTABI=linux install clean

Thanks a lot for your help

Cheers

Xavier

On Tue, 25 Nov 2008 15:04:27 -0500
Lowell Gilbert [EMAIL PROTECTED] wrote:

 Xavier Otazu [EMAIL PROTECTED] writes:
 
  I would like to compile a C++ code to be executed within the linux
  emulator.
 
 http://wiki.freebsd.org/linux-xdev
 
 -- 
 Lowell Gilbert, embedded/networking software engineer, Boston area
   http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gcc cross-compiler for linux

2008-11-25 Thread Tijl Coosemans
On Monday 24 November 2008 18:19:23 Xavier Otazu wrote:
 When building, I get the following error message:
 
 /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/xgcc
 -B/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/
 -B/usr/local/i386-linux/bin/ -B/usr/local/i386-linux/lib/
 -isystem 
 /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc
 -isystem /usr/local/i386-linux/include
 -isystem /usr/local/i386-linux/sys-include -O2  -O2 -O2
 -fno-strict-aliasing -pipe  -DIN_GCC -DCROSS_COMPILE   -W -Wall
 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
 -Wold-style-definition  -isystem ./include  -fPIC -g
 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
 -Dinhibit_libc -I. -I. -I../.././gcc -I../.././gcc/.
 -I../.././gcc/../include -I../.././gcc/../libcpp/include
 -I../.././gcc/../libdecnumber -I../libdecnumber  -fexceptions
 -c ../.././gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
 In file included from 
 /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1,
  from ../.././gcc/gthr.h:114,
  from ../.././gcc/unwind-dw2.c:42:
 ../.././gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory
 ../.././gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory
 In file included from 
 /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1,
  from ../.././gcc/gthr.h:114,
  from ../.././gcc/unwind-dw2.c:42:
 ../.././gcc/gthr-posix.h:46: error: expected '=', ',', ';', 'asm' or 
 '__attribute__' before '__gthread_key_t'
 ../.././gcc/gthr-posix.h:47: error: expected '=', ',', ';', 'asm' or 
 '__attribute__' before '__gthread_once_t'
 ../.././gcc/gthr-posix.h:48: error: expected '=', ',', ';', 'asm' or 
 '__attribute__' before '__gthread_mutex_t'
 ../.././gcc/gthr-posix.h:49: error: expected '=', ',', ';', 'asm' or 
 '__attribute__' before '__gthread_recursive_mutex_t'
 ../.././gcc/gthr-posix.h:92: error: 'pthread_once' undeclared here (not in a 
 function)
 ../.././gcc/gthr-posix.h:93: error: 'pthread_getspecific' undeclared
 here (not in a function)

From that error message I'd say you probably need to populate
/usr/local/i386-linux/include with glibc and linux kernel headers.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


gcc cross-compiler for linux

2008-11-24 Thread Xavier Otazu

Hello,

I would like to compile a C++ code to be executed within the linux
emulator.

I tried to install the cross-gcc port, but when building I always receive the 
same
compilation error related to gthreads.

I use the following options when compiling the cross-gcc port:

make TGTARCH=i386 TGTABI=linux install clean

I also tried several combinations like i386-pc and linux-gnu.

When building, I get the following error message:

/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/xgcc
-B/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/
-B/usr/local/i386-linux/bin/ -B/usr/local/i386-linux/lib/
-isystem 
/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc
-isystem /usr/local/i386-linux/include
-isystem /usr/local/i386-linux/sys-include -O2  -O2 -O2
-fno-strict-aliasing -pipe  -DIN_GCC -DCROSS_COMPILE   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -fPIC -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -I. -I. -I../.././gcc -I../.././gcc/.
-I../.././gcc/../include -I../.././gcc/../libcpp/include
-I../.././gcc/../libdecnumber -I../libdecnumber  -fexceptions
-c ../.././gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from 
/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1,
 from ../.././gcc/gthr.h:114,
 from ../.././gcc/unwind-dw2.c:42:
../.././gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory
../.././gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory
In file included from 
/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1,
 from ../.././gcc/gthr.h:114,
 from ../.././gcc/unwind-dw2.c:42:
../.././gcc/gthr-posix.h:46: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '__gthread_key_t'
../.././gcc/gthr-posix.h:47: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '__gthread_once_t'
../.././gcc/gthr-posix.h:48: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '__gthread_mutex_t'
../.././gcc/gthr-posix.h:49: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before '__gthread_recursive_mutex_t'
../.././gcc/gthr-posix.h:92: error: 'pthread_once' undeclared here (not in a 
function)
../.././gcc/gthr-posix.h:93: error: 'pthread_getspecific' undeclared
here (not in a function)


Thank you in advance

Xavier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


new compiler error?

2008-10-17 Thread Robert Richards
Hi:

I have been trying to upgrade to the latest gnash on my W/S running: FreeBSD
6.3-RELEASE-p5 #3. First, I upgraded the kernel and base to the latest patch
level, then I executed a portupgrade -R gnash, and after all the
pre-requisite packages were upgraded successfully gnash itself began to
compile.

Then this:

===

../libcore/.libs/libgnashcore.so: undefined reference to
`std::basic_ostreamchar, std::char_traitschar  std::basic_ostreamchar,
std::char_traitschar ::_M_insertbool(bool)'

/usr/ports/graphics/gnash/work/gnash-0.8.4/libbase/.libs/libgnashbase.so:
undefined reference to `std::basic_istreamchar, std::char_traitschar 
std::basic_istreamchar, std::char_traitschar ::_M_extractunsigned
int(unsigned int)'

collect2: ld returned 1 exit status

gmake[2]: *** [gprocessor] Error 1

gmake[2]: Leaving directory
`/usr/ports/graphics/gnash/work/gnash-0.8.4/utilities'

gmake[1]: *** [all-recursive] Error 1

gmake[1]: Leaving directory `/usr/ports/graphics/gnash/work/gnash-0.8.4'

gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/graphics/gnash.
*** Error code 1

Stop in /usr/ports/graphics/gnash.

** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portupgrade.43253.1 env UPGRADE_TOOL=portupgrade
UPGRADE_PORT=gnash-0.8.2_2 UPGRADE_PORT_VER=0.8.2_2 make

** Fix the problem and try again.

** Listing the failed packages (-:ignored / *:skipped / !:failed)
! graphics/gnash (gnash-0.8.2_2)(new compiler error)

===

What do I need to do to get this accomplished? I am struggling with limited
flash support, and have been doing fairly well with gnash/firefox. I would
like to upgrade my gnash-0.8.2_2 to the latest version gnash-0.8.4. and
possibly get a bit more functionality.

Oh, one more possible clue. The first time I attempted this, I issued a
portupgrade gnash without recursion. At about the same point of failure, the
system powered down. I mean I saw an LD error, and then POOF, laptop went
power-down! I didn't believe that was the cause, so after cleaning the file
systems, I tried again, and again it powered down. So I pretty much upgraded
everything and after the -R attempt, gnash simply failed.

TIA
Bob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-06 Thread Jakub Lach


Bugzilla from [EMAIL PROTECTED] wrote:
 
 please force update qmake4 and qt4-corelib ports:
 
 # portmaster devel/qmake4 devel/qt4-corelib
 # portupgrade -f devel/qmake4 devel/qt4-corelib
 

I have forced packages one by one today.

Thanks for help and updating UPDATING file.

-- 
View this message in context: 
http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18853066.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-05 Thread Jakub Lach

This is the Qt/X11 Open Source Edition.


   The specified system/compiler is not supported:

 
/usr/ports/devel/qt4-moc/work/qt-x11-opensource-src-4.4.1/mkspecs/freebsd-g++

   Please see the README file for a complete list.

===  Script configure failed unexpectedly.


In README there is no FreeBSD whatsoever.
-- 
View this message in context: 
http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18829459.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-05 Thread Jakub Lach

g++ -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

FreeBSD 7.0-STABLE #0: Mon Jul 28 17:27:04 CEST 2008
-- 
View this message in context: 
http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18829569.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-05 Thread Jakub Lach

/usr/ports/devel/qt4-moc/work/qt-x11-opensource-src-4.4.1/mkspecs/ is empty
directory.
-- 
View this message in context: 
http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18829813.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-05 Thread Martin Wilke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Aug 05, 2008 at 04:51:17AM -0700, Jakub Lach wrote:
 
 This is the Qt/X11 Open Source Edition.
 
 
The specified system/compiler is not supported:
 
  
 /usr/ports/devel/qt4-moc/work/qt-x11-opensource-src-4.4.1/mkspecs/freebsd-g++
 
Please see the README file for a complete list.
 
 ===  Script configure failed unexpectedly.
 

please force update qmake4 and qt4-corelib ports:

# portmaster devel/qmake4 devel/qt4-corelib
# portupgrade -f devel/qmake4 devel/qt4-corelib

- - Martin

 
 In README there is no FreeBSD whatsoever.
 -- 
 View this message in context: 
 http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18829459.html
 Sent from the freebsd-questions mailing list archive at Nabble.com.
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

- -- 

+---+---+
|  PGP: 0x05682353  |  Jabber : miwi(at)BSDCrew.de  |
|  ICQ: 169139903   |  Mail   : miwi(at)FreeBSD.org |
+---+---+
|   Mess with the Best, Die like the Rest!  |
+---+---+
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkiYQhwACgkQFwpycAVoI1P+PwCfT6M7GZMGrWYdeNnS23LLkY/n
IrcAnA/fXHJmFGyEd1oiT4al0yiMq4P9
=iVp2
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-05 Thread Jakub Lach



Bugzilla from [EMAIL PROTECTED] wrote:
 
 please force update qmake4 and qt4-corelib ports:
 
 # portmaster devel/qmake4 devel/qt4-corelib
 # portupgrade -f devel/qmake4 devel/qt4-corelib
 
 - - Martin
 
 

I have already tried upgrading corelib (===   qt4-corelib-4.4.1 depends on
package: qt4-moc=4.4.1 - not found ===  Found qt4-moc-4.3.4, but you need
to upgrade to qt4-moc=4.4.1) now (re)building qmake4, fingers crossed.

Thanks for fast help.
-- 
View this message in context: 
http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18831048.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: qt4-moc-4.4.1 not compiling (compiler/system not supported)

2008-08-05 Thread Jakub Lach



Bugzilla from [EMAIL PROTECTED] wrote:
 
 please force update qmake4 and qt4-corelib ports:
 
 # portmaster devel/qmake4 devel/qt4-corelib
 # portupgrade -f devel/qmake4 devel/qt4-corelib
 

Still cannot upgrade qt4-corelib without qt4-moc=4.4.1.
-- 
View this message in context: 
http://www.nabble.com/qt4-moc-4.4.1-not-compiling-%28compiler-system-not-supported%29-tp18829459p18831591.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difficulty building a cross-compiler with a fresh install

2008-07-30 Thread Roland Smith
On Tue, Jul 29, 2008 at 08:47:42PM -0400, Wyatt Neal wrote:
 greetings,
 
 i've been running with a freebsd 6.1 system for a few days and i'm
 having some oddities when trying to build a cross compiler on the
 system.

You don't say _what_ kind of cross-compiler you want.

Use the available cross-compilers from ports. There is a good chance
someone else has already sorted it out.

You can find a complete list of cross-compilers with 
'ls /usr/ports/devel/*-gcc/Makefile':

/usr/ports/devel/arm-rtems-gcc/Makefile
/usr/ports/devel/avr-gcc/Makefile
/usr/ports/devel/cross-gcc/Makefile
/usr/ports/devel/djgpp-gcc/Makefile
/usr/ports/devel/i386-rtems-gcc/Makefile
/usr/ports/devel/i960-rtems-gcc/Makefile
/usr/ports/devel/m68k-rtems-gcc/Makefile
/usr/ports/devel/mingw32-gcc/Makefile
/usr/ports/devel/mips-rtems-gcc/Makefile
/usr/ports/devel/msp430-gcc/Makefile
/usr/ports/devel/powerpc-gcc/Makefile
/usr/ports/devel/powerpc-rtems-gcc/Makefile
/usr/ports/devel/sh-rtems-gcc/Makefile
/usr/ports/devel/sparc-rtems-gcc/Makefile

Note that cross-gcc is a master port for most of the others except
mingw32-gcc. If you want to cross-compile for win32, use mingw32-gcc.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpycRTpqCH4t.pgp
Description: PGP signature


Re: difficulty building a cross-compiler with a fresh install

2008-07-30 Thread Wyatt Neal
the cross compiler i'm looking to build is one to produce  i386
compatable system v elf executables for freebsd.  the default gcc
installed with freebsd 6.1 produces i386 compatible freebsd elf
executables, not system v.

i've also found that i'm apparently building gcc improperly and with
the wrong version of binutils; however, changing the binutils to the
correct version hasn't helped and i'm still waiting on gcc's build to
get to/past the point where it's been crashing out.

On 7/30/08, Roland Smith [EMAIL PROTECTED] wrote:
 On Tue, Jul 29, 2008 at 08:47:42PM -0400, Wyatt Neal wrote:
  greetings,
 
  i've been running with a freebsd 6.1 system for a few days and i'm
  having some oddities when trying to build a cross compiler on the
  system.

 You don't say _what_ kind of cross-compiler you want.

 Use the available cross-compilers from ports. There is a good chance
 someone else has already sorted it out.

 You can find a complete list of cross-compilers with
 'ls /usr/ports/devel/*-gcc/Makefile':

 /usr/ports/devel/arm-rtems-gcc/Makefile
 /usr/ports/devel/avr-gcc/Makefile
 /usr/ports/devel/cross-gcc/Makefile
 /usr/ports/devel/djgpp-gcc/Makefile
 /usr/ports/devel/i386-rtems-gcc/Makefile
 /usr/ports/devel/i960-rtems-gcc/Makefile
 /usr/ports/devel/m68k-rtems-gcc/Makefile
 /usr/ports/devel/mingw32-gcc/Makefile
 /usr/ports/devel/mips-rtems-gcc/Makefile
 /usr/ports/devel/msp430-gcc/Makefile
 /usr/ports/devel/powerpc-gcc/Makefile
 /usr/ports/devel/powerpc-rtems-gcc/Makefile
 /usr/ports/devel/sh-rtems-gcc/Makefile
 /usr/ports/devel/sparc-rtems-gcc/Makefile

 Note that cross-gcc is a master port for most of the others except
 mingw32-gcc. If you want to cross-compile for win32, use mingw32-gcc.

 Roland
 --
 R.F.Smith   http://www.xs4all.nl/~rsmith/
 [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
 pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


C++ compiler

2008-07-30 Thread [EMAIL PROTECTED]
 What is the URL where I can get  gcc42  and is it easy to get or do I have 
to do devious things to eventually find it?

Are you Catholic and single?  Click Here.
http://thirdpartyoffers.juno.com/TGL2141/fc/Ioyw6i3oGxtfMGTyKQeDjl1IylHH1Cv62LFl9vpA1NFNNk54pbECB6/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ compiler

2008-07-30 Thread Chris Hill

On Wed, 30 Jul 2008, [EMAIL PROTECTED] wrote:

What is the URL where I can get gcc42 and is it easy to get or do 
I have to do devious things to eventually find it?


# cd /usr/ports/lang/gcc42
# make install clean

--
Chris Hill   [EMAIL PROTECTED]
** [ Busy Expunging | ]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C++ compiler

2008-07-30 Thread Kris Kennaway

Chris Hill wrote:

On Wed, 30 Jul 2008, [EMAIL PROTECTED] wrote:

What is the URL where I can get gcc42 and is it easy to get or do 
I have to do devious things to eventually find it?


# cd /usr/ports/lang/gcc42
# make install clean


Or install FreeBSD 7.0 and do nothing else.

# g++ -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

Kris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


difficulty building a cross-compiler with a fresh install

2008-07-29 Thread Wyatt Neal
greetings,

i've been running with a freebsd 6.1 system for a few days and i'm
having some oddities when trying to build a cross compiler on the
system.

the first issue that shows is:

In file included from archive.c:132:
sysdep.h:173:21: libintl.h: No such file or directory

this comes from the libintl.h being located in /usr/local/include
instead of /usr/include.  a simple modification to the CFLAGS as so:

export CFLAGS=-I /usr/local/include

has resolved binutils building correctly.  a build of gcc shows the
same issue; however, gcc fails to build with the following error:

gcc -c   -I /usr/local/include -DIN_GCC -DCROSS_COMPILE  -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long-DHAVE_CONFIG_H-I. -I. -I. -I./. -I./../include
\
./config/i386/i386.c -o i386.o
./config/i386/i386.c:1033: error: `ix86_svr3_asm_out_constructor'
undeclared here (not in a function)
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for
`targetm.asm_out.constructor')
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for `targetm.asm_out')
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for `targetm.sched')
./config/i386/i386.c:1033: error: initializer element is not constant
./config/i386/i386.c:1033: error: (near initialization for `targetm.calls')
./config/i386/i386.c: In function `ix86_file_end':
./config/i386/i386.c:4839: warning: implicit declaration of function
`ASM_DECLARE_FUNCTION_NAME'
gmake[1]: *** [i386.o] Error 1


both binutils and gcc are being built from the source from ftp.gnu.org
following along with
http://docs.freebsd.org/info/gcc/gcc.info.Cross-Compiler.html

i've not encountered this error before on the various linux systems so
i'm assuming it's something that i'm doing with being new to freebsd.
i've been able to compile the above code on my ubuntu system without
issue as well so i'm fairly certain it's something i'm screwing up on
freebsd.

bintuils 2.18 config string:
./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local

gcc 3.4.4 config string:
./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local
--program-suffix=

thoughts?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: difficulty building a cross-compiler with a fresh install

2008-07-29 Thread Dan Nelson
In the last episode (Jul 29), Wyatt Neal said:
 i've been running with a freebsd 6.1 system for a few days and i'm
 having some oddities when trying to build a cross compiler on the
 system.
 
 the first issue that shows is:
 
 In file included from archive.c:132:
 sysdep.h:173:21: libintl.h: No such file or directory
 
 this comes from the libintl.h being located in /usr/local/include
 instead of /usr/include.  a simple modification to the CFLAGS as so:
 
 export CFLAGS=-I /usr/local/include
 
 has resolved binutils building correctly.  a build of gcc shows the
 same issue; however, gcc fails to build with the following error:
 
 gcc -c   -I /usr/local/include -DIN_GCC -DCROSS_COMPILE  -W -Wall
 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
 -Wno-long-long-DHAVE_CONFIG_H-I. -I. -I. -I./. -I./../include
 ./config/i386/i386.c -o i386.o
 ./config/i386/i386.c:1033: error: `ix86_svr3_asm_out_constructor' undeclared 
 here (not in a function)
 ./config/i386/i386.c:1033: error: initializer element is not constant
 ./config/i386/i386.c:1033: error: (near initialization for 
 `targetm.asm_out.constructor')
 ./config/i386/i386.c:1033: error: initializer element is not constant
 ./config/i386/i386.c:1033: error: (near initialization for `targetm.asm_out')
 ./config/i386/i386.c:1033: error: initializer element is not constant
 ./config/i386/i386.c:1033: error: (near initialization for `targetm.sched')
 ./config/i386/i386.c:1033: error: initializer element is not constant
 ./config/i386/i386.c:1033: error: (near initialization for `targetm.calls')
 ./config/i386/i386.c: In function `ix86_file_end':
 ./config/i386/i386.c:4839: warning: implicit declaration of function 
 `ASM_DECLARE_FUNCTION_NAME'
 gmake[1]: *** [i386.o] Error 1
 
 both binutils and gcc are being built from the source from
 ftp.gnu.org following along with
 http://docs.freebsd.org/info/gcc/gcc.info.Cross-Compiler.html
 
 i've not encountered this error before on the various linux systems
 so i'm assuming it's something that i'm doing with being new to
 freebsd. i've been able to compile the above code on my ubuntu system
 without issue as well so i'm fairly certain it's something i'm
 screwing up on freebsd.
 
 bintuils 2.18 config string:
 ./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local
 
 gcc 3.4.4 config string:
 ./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local
 --program-suffix=
 
 thoughts?

Take a look at the devel/cross-binutils and devel/cross-gcc ports.  The
cross-gcc port is at 4.2.3, so you may have to just copy what it does and
build gcc-3.4.4 manually.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


A compiling issue with a new compiler

2008-07-12 Thread Unga
Hi all

I have compiled GCC 4.3.1 from source.

echo 'main(){}'  test.c
cc test.c -v -Wl,--verbose

Above two commands end up with:
attempt to open /usr/lib/crtn.o succeeded
/usr/lib/crtn.o/usr/lib/libc.so: undefined reference to `_nsyylex'
/usr/lib/libc.so: undefined reference to `_nsyyin'
/usr/lib/libc.so: undefined reference to `_nsyytext'
/usr/lib/libc.so: undefined reference to `_nsyyerror'
/usr/lib/libc.so: undefined reference to `_nsyylineno'
collect2: ld returned 1 exit status

ld --verbose | grep SEARCH
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib);

Some relevant portions from the compiler spec file:
*linker:
collect2

*startfile_prefix_spec:
/usr/lib/

*fbsd_dynamic_linker:
/libexec/ld-elf.so.1

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:%(linker) %l %{pie:-pie} %X %{o*}
%{A} %{d} %{e*} %{m} %{N} %{n} %{r}%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!no
stdlib:%{!nostartfiles:%S}}}%{static:} %{L*} %(mfwrap) %(link_libgcc) %o
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib
)%{fprofile-arcs|fprofile-generate|coverage:-lgcov}%{!nostdlib:%{!nodefa
ultlibs:%(link_ssp) %(link_gcc_c_sequence)}}%{!A:%{!nostdlib:%{!nostartfiles
:%E}}} %{T*} }}

Is this something to do with the compiler spec file?

What else should I look for?

Any help in this regard is very much appreciated.

Kind regards
Unga




  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C compiler issue perhaps?

2008-03-17 Thread Derek Ragona

At 12:29 AM 3/17/2008, Doug Hardie wrote:


On Mar 15, 2008, at 05:59, Derek Ragona wrote:


At 09:49 PM 3/14/2008, Doug Hardie wrote:


On Mar 14, 2008, at 18:31, Derek Ragona wrote:


At 06:56 PM 3/14/2008, Doug Hardie wrote:

There is no code running at that point.  Its just sitting there
waiting for me to enter a gdb command.


On Mar 14, 2008, at 15:16, Derek Ragona wrote:


At 05:10 PM 3/14/2008, Doug Hardie wrote:

I have a program I was testing with gdb.  I was trying to figure
out
why c.rmonths was always zero when it should have been 6.
Stepped
through using the gdb n command.  Here is the output:

(gdb)
215 c.rmonths = (edate - tdate) /
toMONTHS;
(gdb)
223 c.dial_in = u.dial_in[0];
(gdb)
224 c.dsl = u.dsl[0];
(gdb) p c.rmonths
$1 = 0
(gdb) p c
$2 = {fa = 0, pwp = 0, disp_email = 0, imonths = 0, rmonths = 6,
  type = 73 'I', cd = 0 '\0', dial_in = 82 'R', dsl = 0 '\0',
  dsl_kit = 0 '\0', ip = 0 '\0', domain = 0 '\0', n_domain = 0
'\0',
  renewal = 89 'Y', program = I\000\000}
(gdb) p c-rmonths
$3 = 6
(gdb) p c.rmonths
$4 = 6


Notice, the first time i print it its zero.  The second time
its 6.
What gives here?  I have seen this before but couldn't pin it
down.
The program is not compiled with any optimization.  It is in a
shared
library though.


It is hard to tell without the code you used.  I would put some
printf's in the code and see what and when that variable gets
set to
in actual running code.

-Derek


I understand it is waiting at a breakpoint in gdb.  What I meant was
put printf's in your code and run the program and look at the
output.  You can use fprintf's to stderr if your prefer and just
look at the stderr output.

It is hard to diagnose what could be a compiler error, or a coding
error.  Remember in C you can do many things you really shouldn't.
It is also advisable to run lint over your source code too.


All that lint shows is it doesn't like comments using // and lots of
errors in /usr/include files.


This sounds more like a c++ program. c++ does a lot of variable
initiation in code you usually won't see.

If this is a c++ program, put conditional printf's or cout's in to
check the code at actual runtime rather than in the debugger.

You may want to use asserts.


Nope.  Very simple c code.  I believe as was pointed out earlier that
this is a gdb issue.  Once gdb found the right value, both it and all
the printfs show the correct value.  I changed nothing.  I am a bit
concerned since this is now in a production system that it may
eventually start fail again which would have some serious consequences.


Doug,

That reason is why you should put asserts in your program.  Also check your 
/etc/make.conf file as well as your program's Makefile for any compiler 
options you may be using.


Another option you may want to explore is trying a different version of 
gcc.  There are a few versions of gcc in the ports you can install and try 
on your program.


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: C compiler issue perhaps?

2008-03-16 Thread Doug Hardie


On Mar 15, 2008, at 05:59, Derek Ragona wrote:


At 09:49 PM 3/14/2008, Doug Hardie wrote:


On Mar 14, 2008, at 18:31, Derek Ragona wrote:


At 06:56 PM 3/14/2008, Doug Hardie wrote:

There is no code running at that point.  Its just sitting there
waiting for me to enter a gdb command.


On Mar 14, 2008, at 15:16, Derek Ragona wrote:


At 05:10 PM 3/14/2008, Doug Hardie wrote:

I have a program I was testing with gdb.  I was trying to figure
out
why c.rmonths was always zero when it should have been 6.   
Stepped

through using the gdb n command.  Here is the output:

(gdb)
215 c.rmonths = (edate - tdate) /
toMONTHS;
(gdb)
223 c.dial_in = u.dial_in[0];
(gdb)
224 c.dsl = u.dsl[0];
(gdb) p c.rmonths
$1 = 0
(gdb) p c
$2 = {fa = 0, pwp = 0, disp_email = 0, imonths = 0, rmonths = 6,
  type = 73 'I', cd = 0 '\0', dial_in = 82 'R', dsl = 0 '\0',
  dsl_kit = 0 '\0', ip = 0 '\0', domain = 0 '\0', n_domain = 0
'\0',
  renewal = 89 'Y', program = I\000\000}
(gdb) p c-rmonths
$3 = 6
(gdb) p c.rmonths
$4 = 6


Notice, the first time i print it its zero.  The second time  
its 6.
What gives here?  I have seen this before but couldn't pin it  
down.

The program is not compiled with any optimization.  It is in a
shared
library though.


It is hard to tell without the code you used.  I would put some
printf's in the code and see what and when that variable gets  
set to

in actual running code.

-Derek


I understand it is waiting at a breakpoint in gdb.  What I meant was
put printf's in your code and run the program and look at the
output.  You can use fprintf's to stderr if your prefer and just
look at the stderr output.

It is hard to diagnose what could be a compiler error, or a coding
error.  Remember in C you can do many things you really shouldn't.
It is also advisable to run lint over your source code too.


All that lint shows is it doesn't like comments using // and lots of
errors in /usr/include files.


This sounds more like a c++ program. c++ does a lot of variable  
initiation in code you usually won't see.


If this is a c++ program, put conditional printf's or cout's in to  
check the code at actual runtime rather than in the debugger.


You may want to use asserts.


Nope.  Very simple c code.  I believe as was pointed out earlier that  
this is a gdb issue.  Once gdb found the right value, both it and all  
the printfs show the correct value.  I changed nothing.  I am a bit  
concerned since this is now in a production system that it may  
eventually start fail again which would have some serious consequences.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


  1   2   3   >