tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: error building lang/g95 on Darwin 12.4 / MacOS X 10.8



On Mon, Jun 24, 2013 at 1:37 AM, Jens Rehsack <sno%netbsd.org@localhost> wrote:
> Hi,
>
> during update pkgsrc to recent -trunk, I encounter following error:
>
> gcc   -g -O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
> -Wold-style-definition -Wmissing-format-attribute    -DHAVE_CONFIG_H  -o
> cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o
> c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o
> c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o
> c-objc-common.o c-dump.o c-pch.o c-parser.o darwin-c.o c-gimplify.o
> tree-mudflap.o c-pretty-print.o dummy-checksum.o \
>           main.o  libbackend.a ../libcpp/libcpp.a ../libcpp/libcpp.a
> ./../intl/libintl.a -L/opt/pkg/lib -liconv  ../libiberty/libiberty.a
> Undefined symbols for architecture x86_64:
>   "_host_hooks", referenced from:
>       _c_common_no_more_pch in c-pch.o
>       _toplev_main in libbackend.a(toplev.o)
>       _gt_pch_restore in libbackend.a(ggc-common.o)
>       _gt_pch_save in libbackend.a(ggc-common.o)
> ld: symbol(s) not found for architecture x86_64
> collect2: ld returned 1 exit status
> gnumake[2]: *** [cc1-dummy] Error 1
> gnumake[1]: *** [all-gcc] Error 2
> gnumake: *** [all] Error 2
> *** Error code 2
>
> Stop.
> bmake: stopped in /data/pkgsrc/lang/g95
> WARNING: Please add USE_TOOLS+=perl to the package Makefile.
> *** Error code 1
>
> If anyone wants me trying something out, or has a hint how to fix
> it quickly, I try what I can do quickly ...
>
> Cheers
> --
> Jens Rehsack
> pkgsrc, Perl5


I got as far as casuing a segv in the build with these patches:

$NetBSD$

--- ../gcc-4.1.2/gcc/config/host-darwin.c.orig  2013-06-21
02:33:53.000000000 +0000
+++ ../gcc-4.1.2/gcc/config/host-darwin.c
@@ -24,6 +24,8 @@
 #include <sys/mman.h>
 #include "toplev.h"
 #include "config/host-darwin.h"
+#include "hosthooks.h"
+#include "hosthooks-def.h"

 /* Yes, this is really supposed to work.  */
 static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096)));
@@ -77,3 +79,5 @@ darwin_gt_pch_use_address (void *addr, s

   return ret;
 }
+
+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER;




$NetBSD$

--- ../gcc-4.1.2/gcc/config/i386/darwin.h.orig  2013-06-21
02:47:24.000000000 +0000
+++ ../gcc-4.1.2/gcc/config/i386/darwin.h
@@ -78,7 +78,7 @@ Boston, MA 02110-1301, USA.  */
 /* By default, target has a 80387, uses IEEE compatible arithmetic,
    and returns float values in the 387.  */

-#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP |
MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE | MASK_ALIGN_DOUBLE)
+#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP |
MASK_FLOAT_RETURNS | MASK_128BIT_LONG_DOUBLE)

 /* TARGET_DEEP_BRANCH_PREDICTION is incompatible with Mach-O PIC.  */



But then someone told me I could just remove the g95 dependency from
fftw and moved on from there.  :)
Homebrew uses gfortran instead of g95 so I wonder if there's just
something about g95 that doesn't support 64bit osx.

Joyent compiles it with success, but 32bit.

Matt


Home | Main Index | Thread Index | Old Index