#51399 closed defect (fixed)
octave-4.0.2_0 upgrade fails
Reported by: | neilt (Neil Tiffin) | Owned by: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.4 |
Keywords: | Cc: | lpn25, kpreid (Kevin Reid), skymoo (Adam Mercer), dershow, bryan.morrissey@…, AP1010, roberthuston@…, dimkab, miguelbarao (MB), andrekw@…, dliessi (Davide Liessi) | |
Port: | octave |
Description (last modified by skymoo (Adam Mercer))
octave-4.0.2_0+app+atlas+docs+fltk+gcc5+java+qt4gui+sound.darwin_15.x86_64 failed to install.
:info:build In file included from /opt/local/include/gcc5/c++/cstdlib:72:0, :info:build from /opt/local/include/gcc5/c++/bits/stl_algo.h:59, :info:build from /opt/local/include/gcc5/c++/algorithm:62, :info:build from /opt/local/libexec/qt4/include/QtCore/qglobal.h:68, :info:build from /opt/local/libexec/qt4/include/QtCore/qnamespace.h:45, :info:build from /opt/local/libexec/qt4/include/QtCore/qobjectdefs.h:45, :info:build from /opt/local/libexec/qt4/include/QtCore/qobject.h:47, :info:build from /opt/local/libexec/qt4/include/QtCore/QObject:1, :info:build from /opt/local/libexec/qt4/include/Qsci/qscilexeroctave.h:28, :info:build from src/m-editor/file-editor-tab.cc:32: :info:build ../libgnu/stdio.h:1039:1: error: conflicting declaration of 'char* gets(char*)' with 'C++' linkage :info:build _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); :info:build ^ :info:build In file included from ../libgnu/stdio.h:43:0, :info:build from ../libgnu/wchar.h:71, :info:build from /opt/local/include/gcc5/c++/cwchar:44, :info:build from /opt/local/include/gcc5/c++/bits/postypes.h:40, :info:build from /opt/local/include/gcc5/c++/bits/char_traits.h:40, :info:build from /opt/local/include/gcc5/c++/string:40, :info:build from /opt/local/libexec/qt4/include/QtCore/qstring.h:54, :info:build from /opt/local/libexec/qt4/include/QtCore/qobject.h:48, :info:build from /opt/local/libexec/qt4/include/QtCore/QObject:1, :info:build from /opt/local/libexec/qt4/include/Qsci/qscilexeroctave.h:28, :info:build from src/m-editor/file-editor-tab.cc:32: :info:build /usr/include/stdio.h:257:7: note: previous declaration with 'C' linkage :info:build char *gets(char *);
Attachments (1)
Change History (24)
Changed 8 years ago by neilt (Neil Tiffin)
comment:1 Changed 8 years ago by neilt (Neil Tiffin)
comment:4 Changed 8 years ago by skymoo (Adam Mercer)
Cc: | michaelld@… mcalhoun@… ram@… added |
---|---|
Description: | modified (diff) |
Keywords: | octave removed |
comment:8 follow-up: 13 Changed 8 years ago by AP1010
It looks like variants +gcc5 and +gcc6 fail to build, however variant +gfortran builds just fine.
comment:9 Changed 8 years ago by roberthuston@…
This looks to be an recurring issue with the gnulib files. There was a problem a couple of years ago with building octave 3.8.0 on Mountain Lion (http://octave.1599824.n4.nabble.com/Building-3-8-0-on-Mountain-Lion-10-8-5-td4660795.html). The solution was to disable the lines
/* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning; besides, C11 removed it. */ #undef gets #if HAVE_RAW_DECL_GETS _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif
in the file libgnu/stdio.in.h
of the MacPorts Octave build directory, which for this version is:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_octave/octave/work/octave-4.0.2
Once I made this local edit, I was able to resume my build and get Octave running.
I'm assuming that the Portfile might need to make a local patch to stdio.in.h as a permanent solution, but this should work for now.
comment:13 Changed 8 years ago by bryan.morrissey@…
Replying to arthur@…:
It looks like variants +gcc5 and +gcc6 fail to build, however variant +gfortran builds just fine.
I had the same result; I was able to build and run the +gfortran variant:
sudo port clean octave sudo port install octave +gfortran -gcc5
Seems to work okay so far, I don't know what the long-term implications of this are.
comment:17 Changed 8 years ago by gnw3
For me, after uuninstalling octave (built with +gcc5
), "port install octave
" worked on Mavericks and El Capitan, but fails on Snow Leopard (10.6.8 using the Apple C++ runtime):
:info:build CXX array/array_libarray_la-Array-idx-vec.lo :info:build In file included from array/Array-idx-vec.cc:29: :info:build In file included from ./array/idx-vector.h:29: :info:build In file included from /usr/include/c++/4.2.1/cstring:52: :info:build ../libgnu/string.h:723:84: error: no member named 'strndup' in the global namespace :info:build namespace gnulib { static char * (*strndup) (char const *__string, size_t __n) = ::strndup; } extern "C" int _gl_cxxalias_dummy; :info:build ~~^ :info:build 1 error generated. :info:build make[3]: *** [array/array_libarray_la-Array-idx-vec.lo] Error 1
I assume this is Libcxx on older systems.
comment:18 follow-up: 20 Changed 8 years ago by dershow
For me as well, just deactivating and installing worked:
sudo port deactivate octave sudo port clean octave sudo port install octave
So, I think that the old default variant now fails, but the new default works. So, just an upgrade fails, but a fresh install, uses +gfortran by default, so works.
comment:20 Changed 8 years ago by lpn25
Replying to dersh@…:
For me as well, just deactivating and installing worked:
sudo port deactivate octave sudo port clean octave sudo port install octaveSo, I think that the old default variant now fails, but the new default works. So, just an upgrade fails, but a fresh install, uses +gfortran by default, so works.
This worked for me too, although I am not sure if there are any implications of using only +fortran.
comment:21 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Owner: | changed from macports-tickets@… to mcalhoun@… |
---|---|
Status: | new → assigned |
comment:22 Changed 8 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Cc: | mcalhoun@… removed |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
GCC 5 fails to recognize __atribute__ on a variable and has an issue with QScintilla (see #51437).
GCC 6 seems to have some significant issues with octave.
For now, disable both in r148872.
MacPorts 2.3.4 OS X 10.11.4 (15E65)