Giter Site home page Giter Site logo

Comments (9)

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by Rico Häuselmann (Bitbucket: RicoHaeuselmann, ).


added outputs for gcc-4.9 and gcc-4.7 compile tests

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by P H (Bitbucket: phyatt, GitHub: phyatt).


I am also having this same issue, but in the context of a brew install of coin 3.1.3.

While digging about this I found this:

bitcoin/bitcoin#2806

It was accidental, bitcoin != coin3d, but they do discuss some of the new issues related to compiling with 10.9 OSX Mavericks.

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by P H (Bitbucket: phyatt, GitHub: phyatt).


This is my first time contributing to a project of this scope before. Let me know if I am being too verbose.

My environment is Mac OSX, 10.9, Mavericks
compiler info:

#!bash

$ clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

in response to these lines of error (after calling make):

#!makefile

Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
if /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I../include -I../include -I../src -I../src -I../include/Inventor/annex -I..   -no-cpp-precomp -D_REENTRANT -DCOIN_DEBUG=1 -DCOIN_INTERNAL  -g -O2 -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual  -fno-builtin -fno-for-scope -finline-functions -Wreturn-type -Wchar-subscripts -Wparentheses -MT all-actions-cpp.lo -MD -MP -MF ".deps/all-actions-cpp.Tpo" -c -o all-actions-cpp.lo `test -f 'actions/all-actions-cpp.cpp' || echo './'`actions/all-actions-cpp.cpp; \
	then mv -f ".deps/all-actions-cpp.Tpo" ".deps/all-actions-cpp.Plo"; else rm -f ".deps/all-actions-cpp.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I../include -I../include -I../src -I../src -I../include/Inventor/annex -I.. -no-cpp-precomp -D_REENTRANT -DCOIN_DEBUG=1 -DCOIN_INTERNAL -g -O2 -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -fno-builtin -fno-for-scope -finline-functions -Wreturn-type -Wchar-subscripts -Wparentheses -MT all-actions-cpp.lo -MD -MP -MF .deps/all-actions-cpp.Tpo -c actions/all-actions-cpp.cpp  -fno-common -DPIC -o .libs/all-actions-cpp.o
clang: error: the clang compiler does not support '-fno-for-scope'

I went into the src folder, and removed the -fno-for-scope flag from the CXXFLAGS variable in the generated Makefile. I looked at the Makefile.am and the configure.ac, and thought I would find the fix and report it instead of directly editing those files for now.

Here are the three errors that came up at the end of the build:

#!make


In file included from actions/all-actions-cpp.cpp:31:
In file included from actions/SoAction.cpp:197:
In file included from ../include/Inventor/actions/SoAction.h:27:
../include/Inventor/SbBasic.h:99:5: error: call to function 'cc_debugerror_post' that is neither visible in the template definition nor found by argument-dependent lookup
    cc_debugerror_post(funcname, "divide by zero error.", divider);
    ^
../include/Inventor/SbVec3f.h:78:37: note: in instantiation of function template specialization 'SbDividerChk<float>' requested here
  SbVec3f & operator /= (float d) { SbDividerChk("SbVec3f::operator/=(float)", d); return operator *= (1.0f / d); }
                                    ^
../include/Inventor/C/errors/debugerror.h:59:19: note: 'cc_debugerror_post' should be declared prior to the call site
COIN_DLL_API void cc_debugerror_post(const char * source, const char * format, ...);
                  ^
In file included from actions/all-actions-cpp.cpp:31:
In file included from actions/SoAction.cpp:197:
In file included from ../include/Inventor/actions/SoAction.h:27:
../include/Inventor/SbBasic.h:99:5: error: call to function 'cc_debugerror_post' that is neither visible in the template definition nor found by argument-dependent lookup
    cc_debugerror_post(funcname, "divide by zero error.", divider);
    ^
../include/Inventor/SbVec2s.h:71:35: note: in instantiation of function template specialization 'SbDividerChk<int>' requested here
  SbVec2s & operator /= (int d) { SbDividerChk("SbVec2s::operator/=(int)", d); vec[0] /= d; vec[1] /= d; return *this; }
                                  ^
../include/Inventor/C/errors/debugerror.h:59:19: note: 'cc_debugerror_post' should be declared prior to the call site
COIN_DLL_API void cc_debugerror_post(const char * source, const char * format, ...);
                  ^
In file included from actions/all-actions-cpp.cpp:31:
In file included from actions/SoAction.cpp:197:
In file included from ../include/Inventor/actions/SoAction.h:27:
../include/Inventor/SbBasic.h:99:5: error: call to function 'cc_debugerror_post' that is neither visible in the template definition nor found by argument-dependent lookup
    cc_debugerror_post(funcname, "divide by zero error.", divider);
    ^
../include/Inventor/SbVec2s.h:72:38: note: in instantiation of function template specialization 'SbDividerChk<double>' requested here
  SbVec2s & operator /= (double d) { SbDividerChk("SbVec2s::operator/=(double)", d); return operator *= (1.0 / d); }
                                     ^
../include/Inventor/C/errors/debugerror.h:59:19: note: 'cc_debugerror_post' should be declared prior to the call site
COIN_DLL_API void cc_debugerror_post(const char * source, const char * format, ...);

That's where it is at for clang in my debugging right now.

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by paul_koning (Bitbucket: paul_koning, ).


I have it working, with three patches. See below. The first two are specific to clang; the third was previously documented in a number of other places and is also needed for recent versions of gcc.

diff -ur Coin-3.1.3/configure Coin-3.1.3.new/configure
--- Coin-3.1.3/configure	2010-03-02 08:20:09.000000000 -0500
+++ Coin-3.1.3.new/configure	2014-01-12 15:02:17.000000000 -0500
@@ -25277,11 +25277,11 @@
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -fno-for-scoping" >&5
-$as_echo_n "checking whether $CXX accepts -fno-for-scoping... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -fno-for-scope" >&5
+$as_echo_n "checking whether $CXX accepts -fno-for-scope... " >&6; }
 
 sim_ac_save_cppflags=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS -fno-for-scoping"
+CPPFLAGS="$CPPFLAGS -fno-for-scope"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
diff -ur Coin-3.1.3/include/Inventor/C/base/math-undefs.h Coin-3.1.3.new/include/Inventor/C/base/math-undefs.h
--- Coin-3.1.3/include/Inventor/C/base/math-undefs.h	2010-03-02 08:20:09.000000000 -0500
+++ Coin-3.1.3.new/include/Inventor/C/base/math-undefs.h	2014-01-12 15:14:45.000000000 -0500
@@ -40,6 +40,7 @@
   work as intended.  20070518 larsa
 */
 
+#ifndef __clang__
 #undef cosf
 #define cosf(x) NO_SINGLEPREC /* whatever that'll give us a compile error... */
 #undef sinf
@@ -58,6 +59,7 @@
 #define atanf(x) NO_SINGLEPREC
 #undef atan2f
 #define atan2f(x) NO_SINGLEPREC
+#endif
 
 /* *********************************************************************** */
 
diff -ur Coin-3.1.3/include/Inventor/SbBasic.h Coin-3.1.3.new/include/Inventor/SbBasic.h
--- Coin-3.1.3/include/Inventor/SbBasic.h	2010-03-02 08:20:09.000000000 -0500
+++ Coin-3.1.3.new/include/Inventor/SbBasic.h	2014-01-12 13:31:47.000000000 -0500
@@ -25,6 +25,7 @@
 \**************************************************************************/
 
 #include <Inventor/C/basic.h>
+#include <Inventor/C/errors/debugerror.h>
 
 /* ********************************************************************** */
 /* Trap people trying to use Inventor headers while compiling C source code.

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by P H (Bitbucket: phyatt, GitHub: phyatt).


Those fixes look identical to the ones I was working on. I was having
difficulty with hg to push my changes up to my fork. That looks correct to
me.

Good job on those fixes!

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


I have accepted pull request #191 which is simply the 'undefine' element of the above discussion.

Roy

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by Jesse Hamner (Bitbucket: jhamner, GitHub: jhamner).


This change fixes problems I was having in Mac OS X 10.9 (Mavericks) using a variety of compilers and versions. Thanks!

Additional info: macports 2.3.0 clang-3.4

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by Thomas Moeller (Bitbucket: TheHubbit, GitHub: TheHubbit).


Also in my opinion this issue can be closed. I just did a fresh clone and had not errors running configure and make on OS X 10.9 with clang.

from coin.

VolkerEnderlein avatar VolkerEnderlein commented on June 18, 2024

Original comment by Roy Walmsley (Bitbucket: walroy, GitHub: walroy).


Closed issue as pull request #191 fixes these problems.

from coin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.