Discussion:
Building geda-gaf on Mac OS X 10.9 fails on scheme_object.x (also on FreeBSD?)
(too old to reply)
Charles Lepple
2014-06-22 16:03:14 UTC
Permalink
Hi all,

Just upgraded one of my boxes to OS X 10.9, and I get the following
error when building geda-gaf 1.8.1:

######################################

/bin/sh ../../libtool --silent --tag=CC --mode=compile gcc
-DHAVE_CONFIG_H -I. -I../.. -DLOCALEDIR=\"/sw.mav/share/locale\"
-I./../include -I./../include/libgeda -I../.. -I/sw.mav/include
-I/include -Wall -I/sw.mav/include -D_THREAD_SAFE
-I/sw.mav/include/glib-2.0 -I/sw.mav/lib/glib-2.0/include
-I/sw.mav/include/gtk-2.0 -I/sw.mav/include/glib-2.0
-I/sw.mav/lib/glib-2.0/include -Os -pipe -MT
libgeda_la-scheme_object.lo -MD -MP -MF
.deps/libgeda_la-scheme_object.Tpo -c -o libgeda_la-scheme_object.lo
`test -f 'scheme_object.c' || echo './'`scheme_object.c

In file included from scheme_object.c:2175:
./scheme_object.x:80:84: error: expected ')'
scm_c_define_gsubr (s_translate_object_x, 3, 0, 0, (SCM (*)())
translate_object_x); ;

^
./scheme_object.x:79:21: note: to match this '('

scm_c_define_gsubr (s_set_picture_data_vector_x,

^
1 error generated.

######################################

Has anyone seen anything similar?

Lines 79 and 80 of scheme_object.x look like this:

scm_c_define_gsubr (s_set_picture_data_vector_x,
scm_c_define_gsubr (s_translate_object_x, 3, 0, 0, (SCM (*)())
translate_object_x); ;

So I can see why the compiler (clang, FWIW) doesn't like it.

Before anyone asks, yes, I'll be upgrading to geda-gaf 1.8.2, but
1.8.1 built properly on OS X 10.7, and there is a similar build
failure out there for 1.8.2 on FreeBSD:

https://www.mail-archive.com/freebsd-pkg-fallout-h+***@public.gmane.org/msg153732.html

So I'm just focusing on one issue at a time, and this would seem to be
common to both 1.8.1 and 1.8.2.

I have guile 1.8.8 installed via Fink. No errors from guile-1.8-snarf
(I can post the full build logs somewhere if needed).

$ gcc --version

Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)

Target: x86_64-apple-darwin13.2.0

Thread model: posix

(This is the default compiler that comes with Xcode 5.1.1 command line tools.)
--
- Charles Lepple
Peter Clifton
2014-06-26 16:29:29 UTC
Permalink
Post by Charles Lepple
######################################
Has anyone seen anything similar?
scm_c_define_gsubr (s_set_picture_data_vector_x,
scm_c_define_gsubr (s_translate_object_x, 3, 0, 0, (SCM (*)())
translate_object_x); ;
So I can see why the compiler (clang, FWIW) doesn't like it.
Sorry - output looks clean on my box, but that is git HEAD. Doesn't
appear there are any relevant fixes since s_set_picture_data_vector_x
was added though, so I'm guessing it must be a toolchain issue.
--
Peter Clifton <peter.clifton-j0HF+osULJQMjHSeoOxd2MuBeof9RJB+Wmv/***@public.gmane.org>

Clifton Electronics
Charles Lepple
2014-06-26 18:12:05 UTC
Permalink
Post by Peter Clifton
Sorry - output looks clean on my box, but that is git HEAD. Doesn't
appear there are any relevant fixes since s_set_picture_data_vector_x
was added though, so I'm guessing it must be a toolchain issue.
Peter,

Which version of Guile and the C preprocessor worked for you? (guile-snarf seems to call gcc -E)

Thanks,

- Charles
Peter Clifton
2014-06-26 18:35:18 UTC
Permalink
Post by Charles Lepple
Post by Peter Clifton
Sorry - output looks clean on my box, but that is git HEAD. Doesn't
appear there are any relevant fixes since s_set_picture_data_vector_x
was added though, so I'm guessing it must be a toolchain issue.
Peter,
Which version of Guile and the C preprocessor worked for you? (guile-snarf seems to call gcc -E)
Seems to be gcc-4.8 and guile-snarf from the ubuntu package guile-2.0.9+1-1ubuntu1

Do you have the commit d01e46055593990e918d94e4b30609df989561b4

build-sys: guile-snarf should use host CPP.

Fix cross-compilation by making sure that guile-snarf uses the same C
preprocessor that will be later used for compilation.
--
Peter Clifton <peter.clifton-j0HF+osULJQMjHSeoOxd2MuBeof9RJB+Wmv/***@public.gmane.org>

Clifton Electronics
Charles Lepple
2014-07-05 23:27:54 UTC
Permalink
Post by Peter Clifton
Post by Charles Lepple
Which version of Guile and the C preprocessor worked for you? (guile-snarf seems to call gcc -E)
Seems to be gcc-4.8 and guile-snarf from the ubuntu package guile-2.0.9+1-1ubuntu1
Hmm, interesting - I tried replacing guile-1.8-snarf with
guile-2.0-snarf and things built. Now I'm checking with the Fink
maintainer of the guile18/20 packages.
Post by Peter Clifton
Do you have the commit d01e46055593990e918d94e4b30609df989561b4
build-sys: guile-snarf should use host CPP.
Fix cross-compilation by making sure that guile-snarf uses the same C
preprocessor that will be later used for compilation.
I think it's in there - I set the -x flag in the #! line for
guile-snarf and it seems to be passing in a reasonable value for $CPP.
At any rate, both ${cpp} invocations look the same in the various
guile-*-snarf scripts, so I suspect the problem is in the sed script
(which is different).
--
- Charles Lepple
Charles Lepple
2014-07-22 01:46:05 UTC
Permalink
Post by Charles Lepple
Post by Peter Clifton
Post by Charles Lepple
Which version of Guile and the C preprocessor worked for you? (guile-snarf seems to call gcc -E)
Seems to be gcc-4.8 and guile-snarf from the ubuntu package guile-2.0.9+1-1ubuntu1
Hmm, interesting - I tried replacing guile-1.8-snarf with
guile-2.0-snarf and things built. Now I'm checking with the Fink
maintainer of the guile18/20 packages.
To make geda-gaf 1.8.2 build against Fink's guile18, Martin Costabel
figured out that guile-snarf works better if the offending source line
is split as follows:

http://fink.cvs.sourceforge.net/viewvc/fink/dists/10.7/stable/main/finkinfo/sci/geda-gaf.patch?revision=1.1&view=markup

(I suspect something similar will work for FreeBSD 10, which I believe
also defaults to clang.)
--
- Charles Lepple
Loading...