help-octave
[Top][All Lists]
Advanced

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

Re: Octave with FLTK backend on Mac OS X?


From: John W. Eaton
Subject: Re: Octave with FLTK backend on Mac OS X?
Date: Mon, 15 Feb 2010 16:30:01 -0500

On 15-Feb-2010, Matthias Brennwald wrote:

| On Feb 12, 2010, at 10:31 PM, Ben Abbott wrote:
| 
| > You're building 3.2.x, correct?
| 
| Yes, 3.2.4.
| 
| 
| On Feb 14, 2010, at 8:59 PM, John W. Eaton wrote:
| 
| > On 14-Feb-2010, Matthias Brennwald wrote:
| > 
| > | On Feb 12, 2010, at 11:08 PM, John W. Eaton wrote:
| > | 
| > | > F77_FUNC should be defined in your config.h file.  Is it?  If not, you
| > | > need to determine why it was not defined correctly for your system.
| > | 
| > | As far as I can tell, it is not defined. I attached my config.h
| > | file, maybe that's useful.
| > 
| > You'll need to examine the config.log file to find out which tests
| > failed to find an appropriate definition.
| 
| I attached my config.log file. I don't understand what's in there.

The relevant part of the file is:

  configure:10333: checking for Fortran 77 name-mangling scheme
  configure:10346: gfortran -c -O conftest.f >&5
  configure:10346: $? = 0
  configure:10387: gcc -o conftest -g -O2  -I/opt/local/include 
-L/opt/local/lib -L/usr/lib conftest.c cfortran_test.o -lhdf5 -lz -lm   
-L/opt/local/lib -L/usr/lib -L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0 
-L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/../../.. -lhdf5 -lz -lm 
-lgfortranbegin -lgfortran >&5
  ld: warning: in cfortran_test.o, file is not of required architecture
  ld: warning: in 
/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgfortranbegin.a, file is not 
of required architecture
  ld: warning: in /usr/local/lib/libgfortran.dylib, file is not of required 
architecture
  ld: warning: in /usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgcc.a, 
file is not of required architecture
  Undefined symbols:
    "_foobar", referenced from:
        _main in ccTy7m7I.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  configure:10387: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME ""
  | #define PACKAGE_TARNAME ""
  | #define PACKAGE_VERSION ""
  | #define PACKAGE_STRING ""
  | #define PACKAGE_BUGREPORT ""
  | #define PACKAGE_URL ""
  | #define OCTAVE_SOURCE 1
  | #define STDC_HEADERS 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_MEMORY_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_UNISTD_H 1
  | #define __EXTENSIONS__ 1
  | #define _ALL_SOURCE 1
  | #define _GNU_SOURCE 1
  | #define _POSIX_PTHREAD_SEMANTICS 1
  | #define _TANDEM_SOURCE 1
  | #define SEPCHAR ':'
  | #define SEPCHAR_STR ":"
  | #define __NO_MATH_INLINES 1
  | #define CXX_NEW_FRIEND_TEMPLATE_DECL 1
  | #define CXX_ISO_COMPLIANT_LIBRARY 1
  | #define HAVE_PTHREAD 1
  | #define HAVE_X_WINDOWS 1
  | #define HAVE_FRAMEWORK_CARBON 1
  | #define HAVE_LIBM 1
  | #define HAVE_PCRE_COMPILE 1
  | #define HAVE_PCRE 1
  | #define HAVE_REGEXEC 1
  | #define HAVE_REGEX 1
  | #define HAVE_ZLIB_H 1
  | #define HAVE_ZLIB 1
  | #define HAVE_HDF5_H 1
  | #define HAVE_HDF5 1
  | #define HAVE_H5GGET_NUM_OBJS 1
  | #define HAVE_FFTW3 1
  | #define HAVE_GLPK_H 1
  | #define HAVE_GLPK 1
  | #define HAVE_CURL_CURL_H 1
  | #define HAVE_CURL 1
  | #define HAVE_MAGICK 1
  | #define HAVE_FRAMEWORK_OPENGL 1
  | #define HAVE_OPENGL 1
  | #define HAVE_FTGL_FTGL_H 1
  | #define HAVE_FTGL 1
  | #define HAVE_FLTK 1
  | #define HAVE_IEEE754_DATA_FORMAT 1
  | /* end confdefs.h.  */
  | 
  | /* Override any GCC internal prototype to avoid an error.
  |    Use char because int might match the return type of a GCC
  |    builtin and then its argument prototype would still apply.  */
  | #ifdef __cplusplus
  | extern "C"
  | #endif
  | char foobar ();
  | #ifdef F77_DUMMY_MAIN
  | 
  | #  ifdef __cplusplus
  |      extern "C"
  | #  endif
  |    int F77_DUMMY_MAIN() { return 1; }
  | 
  | #endif
  | int
  | main ()
  | {
  | return foobar ();
  |   ;
  |   return 0;
  | }
  configure:10387: gcc -o conftest -g -O2  -I/opt/local/include 
-L/opt/local/lib -L/usr/lib conftest.c cfortran_test.o -lhdf5 -lz -lm   
-L/opt/local/lib -L/usr/lib -L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0 
-L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/../../.. -lhdf5 -lz -lm 
-lgfortranbegin -lgfortran >&5
  ld: warning: in cfortran_test.o, file is not of required architecture
  ld: warning: in 
/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgfortranbegin.a, file is not 
of required architecture
  ld: warning: in /usr/local/lib/libgfortran.dylib, file is not of required 
architecture
  ld: warning: in /usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgcc.a, 
file is not of required architecture
  Undefined symbols:
    "_foobar_", referenced from:
        _main in ccXraNau.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  configure:10387: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME ""
  | #define PACKAGE_TARNAME ""
  | #define PACKAGE_VERSION ""
  | #define PACKAGE_STRING ""
  | #define PACKAGE_BUGREPORT ""
  | #define PACKAGE_URL ""
  | #define OCTAVE_SOURCE 1
  | #define STDC_HEADERS 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_MEMORY_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_UNISTD_H 1
  | #define __EXTENSIONS__ 1
  | #define _ALL_SOURCE 1
  | #define _GNU_SOURCE 1
  | #define _POSIX_PTHREAD_SEMANTICS 1
  | #define _TANDEM_SOURCE 1
  | #define SEPCHAR ':'
  | #define SEPCHAR_STR ":"
  | #define __NO_MATH_INLINES 1
  | #define CXX_NEW_FRIEND_TEMPLATE_DECL 1
  | #define CXX_ISO_COMPLIANT_LIBRARY 1
  | #define HAVE_PTHREAD 1
  | #define HAVE_X_WINDOWS 1
  | #define HAVE_FRAMEWORK_CARBON 1
  | #define HAVE_LIBM 1
  | #define HAVE_PCRE_COMPILE 1
  | #define HAVE_PCRE 1
  | #define HAVE_REGEXEC 1
  | #define HAVE_REGEX 1
  | #define HAVE_ZLIB_H 1
  | #define HAVE_ZLIB 1
  | #define HAVE_HDF5_H 1
  | #define HAVE_HDF5 1
  | #define HAVE_H5GGET_NUM_OBJS 1
  | #define HAVE_FFTW3 1
  | #define HAVE_GLPK_H 1
  | #define HAVE_GLPK 1
  | #define HAVE_CURL_CURL_H 1
  | #define HAVE_CURL 1
  | #define HAVE_MAGICK 1
  | #define HAVE_FRAMEWORK_OPENGL 1
  | #define HAVE_OPENGL 1
  | #define HAVE_FTGL_FTGL_H 1
  | #define HAVE_FTGL 1
  | #define HAVE_FLTK 1
  | #define HAVE_IEEE754_DATA_FORMAT 1
  | /* end confdefs.h.  */
  | 
  | /* Override any GCC internal prototype to avoid an error.
  |    Use char because int might match the return type of a GCC
  |    builtin and then its argument prototype would still apply.  */
  | #ifdef __cplusplus
  | extern "C"
  | #endif
  | char foobar_ ();
  | #ifdef F77_DUMMY_MAIN
  | 
  | #  ifdef __cplusplus
  |      extern "C"
  | #  endif
  |    int F77_DUMMY_MAIN() { return 1; }
  | 
  | #endif
  | int
  | main ()
  | {
  | return foobar_ ();
  |   ;
  |   return 0;
  | }
  configure:10387: gcc -o conftest -g -O2  -I/opt/local/include 
-L/opt/local/lib -L/usr/lib conftest.c cfortran_test.o -lhdf5 -lz -lm   
-L/opt/local/lib -L/usr/lib -L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0 
-L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/../../.. -lhdf5 -lz -lm 
-lgfortranbegin -lgfortran >&5
  ld: warning: in cfortran_test.o, file is not of required architecture
  ld: warning: in 
/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgfortranbegin.a, file is not 
of required architecture
  ld: warning: in /usr/local/lib/libgfortran.dylib, file is not of required 
architecture
  ld: warning: in /usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgcc.a, 
file is not of required architecture
  Undefined symbols:
    "_FOOBAR", referenced from:
        _main in cc9fELqk.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  configure:10387: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME ""
  | #define PACKAGE_TARNAME ""
  | #define PACKAGE_VERSION ""
  | #define PACKAGE_STRING ""
  | #define PACKAGE_BUGREPORT ""
  | #define PACKAGE_URL ""
  | #define OCTAVE_SOURCE 1
  | #define STDC_HEADERS 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_MEMORY_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_UNISTD_H 1
  | #define __EXTENSIONS__ 1
  | #define _ALL_SOURCE 1
  | #define _GNU_SOURCE 1
  | #define _POSIX_PTHREAD_SEMANTICS 1
  | #define _TANDEM_SOURCE 1
  | #define SEPCHAR ':'
  | #define SEPCHAR_STR ":"
  | #define __NO_MATH_INLINES 1
  | #define CXX_NEW_FRIEND_TEMPLATE_DECL 1
  | #define CXX_ISO_COMPLIANT_LIBRARY 1
  | #define HAVE_PTHREAD 1
  | #define HAVE_X_WINDOWS 1
  | #define HAVE_FRAMEWORK_CARBON 1
  | #define HAVE_LIBM 1
  | #define HAVE_PCRE_COMPILE 1
  | #define HAVE_PCRE 1
  | #define HAVE_REGEXEC 1
  | #define HAVE_REGEX 1
  | #define HAVE_ZLIB_H 1
  | #define HAVE_ZLIB 1
  | #define HAVE_HDF5_H 1
  | #define HAVE_HDF5 1
  | #define HAVE_H5GGET_NUM_OBJS 1
  | #define HAVE_FFTW3 1
  | #define HAVE_GLPK_H 1
  | #define HAVE_GLPK 1
  | #define HAVE_CURL_CURL_H 1
  | #define HAVE_CURL 1
  | #define HAVE_MAGICK 1
  | #define HAVE_FRAMEWORK_OPENGL 1
  | #define HAVE_OPENGL 1
  | #define HAVE_FTGL_FTGL_H 1
  | #define HAVE_FTGL 1
  | #define HAVE_FLTK 1
  | #define HAVE_IEEE754_DATA_FORMAT 1
  | /* end confdefs.h.  */
  | 
  | /* Override any GCC internal prototype to avoid an error.
  |    Use char because int might match the return type of a GCC
  |    builtin and then its argument prototype would still apply.  */
  | #ifdef __cplusplus
  | extern "C"
  | #endif
  | char FOOBAR ();
  | #ifdef F77_DUMMY_MAIN
  | 
  | #  ifdef __cplusplus
  |      extern "C"
  | #  endif
  |    int F77_DUMMY_MAIN() { return 1; }
  | 
  | #endif
  | int
  | main ()
  | {
  | return FOOBAR ();
  |   ;
  |   return 0;
  | }
  configure:10387: gcc -o conftest -g -O2  -I/opt/local/include 
-L/opt/local/lib -L/usr/lib conftest.c cfortran_test.o -lhdf5 -lz -lm   
-L/opt/local/lib -L/usr/lib -L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0 
-L/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/../../.. -lhdf5 -lz -lm 
-lgfortranbegin -lgfortran >&5
  ld: warning: in cfortran_test.o, file is not of required architecture
  ld: warning: in 
/usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgfortranbegin.a, file is not 
of required architecture
  ld: warning: in /usr/local/lib/libgfortran.dylib, file is not of required 
architecture
  ld: warning: in /usr/local/lib/gcc/i386-apple-darwin9.0.0/4.3.0/libgcc.a, 
file is not of required architecture
  Undefined symbols:
    "_FOOBAR_", referenced from:
        _main in ccakgKzw.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status
  configure:10387: $? = 1
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME ""
  | #define PACKAGE_TARNAME ""
  | #define PACKAGE_VERSION ""
  | #define PACKAGE_STRING ""
  | #define PACKAGE_BUGREPORT ""
  | #define PACKAGE_URL ""
  | #define OCTAVE_SOURCE 1
  | #define STDC_HEADERS 1
  | #define HAVE_SYS_TYPES_H 1
  | #define HAVE_SYS_STAT_H 1
  | #define HAVE_STDLIB_H 1
  | #define HAVE_STRING_H 1
  | #define HAVE_MEMORY_H 1
  | #define HAVE_STRINGS_H 1
  | #define HAVE_INTTYPES_H 1
  | #define HAVE_STDINT_H 1
  | #define HAVE_UNISTD_H 1
  | #define __EXTENSIONS__ 1
  | #define _ALL_SOURCE 1
  | #define _GNU_SOURCE 1
  | #define _POSIX_PTHREAD_SEMANTICS 1
  | #define _TANDEM_SOURCE 1
  | #define SEPCHAR ':'
  | #define SEPCHAR_STR ":"
  | #define __NO_MATH_INLINES 1
  | #define CXX_NEW_FRIEND_TEMPLATE_DECL 1
  | #define CXX_ISO_COMPLIANT_LIBRARY 1
  | #define HAVE_PTHREAD 1
  | #define HAVE_X_WINDOWS 1
  | #define HAVE_FRAMEWORK_CARBON 1
  | #define HAVE_LIBM 1
  | #define HAVE_PCRE_COMPILE 1
  | #define HAVE_PCRE 1
  | #define HAVE_REGEXEC 1
  | #define HAVE_REGEX 1
  | #define HAVE_ZLIB_H 1
  | #define HAVE_ZLIB 1
  | #define HAVE_HDF5_H 1
  | #define HAVE_HDF5 1
  | #define HAVE_H5GGET_NUM_OBJS 1
  | #define HAVE_FFTW3 1
  | #define HAVE_GLPK_H 1
  | #define HAVE_GLPK 1
  | #define HAVE_CURL_CURL_H 1
  | #define HAVE_CURL 1
  | #define HAVE_MAGICK 1
  | #define HAVE_FRAMEWORK_OPENGL 1
  | #define HAVE_OPENGL 1
  | #define HAVE_FTGL_FTGL_H 1
  | #define HAVE_FTGL 1
  | #define HAVE_FLTK 1
  | #define HAVE_IEEE754_DATA_FORMAT 1
  | /* end confdefs.h.  */
  | 
  | /* Override any GCC internal prototype to avoid an error.
  |    Use char because int might match the return type of a GCC
  |    builtin and then its argument prototype would still apply.  */
  | #ifdef __cplusplus
  | extern "C"
  | #endif
  | char FOOBAR_ ();
  | #ifdef F77_DUMMY_MAIN
  | 
  | #  ifdef __cplusplus
  |      extern "C"
  | #  endif
  |    int F77_DUMMY_MAIN() { return 1; }
  | 
  | #endif
  | int
  | main ()
  | {
  | return FOOBAR_ ();
  |   ;
  |   return 0;
  | }
  configure:10487: result: unknown
  configure:10542: WARNING: unknown Fortran name-mangling scheme

The Fortran program that the configure test is trying to link with is
not shown above, but from looking at the configure script itself, it
is

      subroutine foobar()
      return
      end
      subroutine foo_bar()
      return
      end

The configure script tests expect that if you compile this function
with a Fortran compiler, it will generate symbols that look like

  foobar foobar_ FOOBAR or FOOBAR_

for the first subroutine in the file.  But your C compiler is
apparently prepending an underscore to external names while your
Fortran compiler is not.

I don't use OS X, so I can't say what is normal or expected for OS X
systems.

What versions of gcc, g++, and gfortran do you have?  Are they all
from the same GCC distribution, or are you trying to mix and match
versions from different GCC releases?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]