Opened 8 years ago
Closed 8 years ago
#695 closed bug (not a bug)
Compilation in debug mode fails on OSX 10.10 Yosemite
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | minor | Milestone: | 4-1-0 and higher |
Component: | dontKnow | Version: | 4-0-1 |
Keywords: | Cc: |
Description
On OS X 10.9 Mavericks, I can configure with
./configure --enable-debug --disable-optimizationflags
and subsequently compile in "debug mode" that works with lldb
.
On OS X 10.10 Yosemite, Singular compiles and runs fine with these options disabled. When they are enabled, however, I encounter two different problems.
- The file
gb_internal.h
seems to have an error in several functions, where it expects an argumenttemp_size
. An#ifdef
removes the name of this argument whenSING_NDEBUG
is defined, e.g., line 1080, but there is no such guard in the body of the function, e.g., line 1094 (line numbers in my version -- search fortemp_size
). I don't understand the C standard well enough to know whether this is a bit of naughtiness in Singular, and clang has become strict on this, or a bug in clang.
- If I remove the comments around
temp_size
in those declarations, Singular compiles with debug information. Unfortunately, the resulting binary crashes upon startup, with the following error:
dyld: Symbol not found: __Z8checkallv Referenced from: /path/to/Singular/Singular Expected in: flat namespace in /path/to/Singular/Singular Trace/BPT trap: 5
checkallv
looks like a function for debug-enabled Singular. This must be an issue introduced by Yosemite, though I have no idea how to fix it.
Change History (3)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Thank you! I thought I had performed make clean
, but that must have been when I was compiling GMP. It has definitely built; sorry for the pointless trac report.
comment:3 Changed 8 years ago by
Resolution: | → not a bug |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
__Z8checkallv
(demangled: checkall()) refers to procedure which is only available in debug mode. It seems that you have somehow mixed up debug and optimized files: make sure that (in debug mode) SING_NDEBUG is not defined in all files.The different declarations in tgb_internal.h should only make the compiler happy: temp_size is (for SING_NDEBUG defined) not used which would produce a warning.
And to the "missing" guard in the body: according to the C-standard it is not needed: if SING_NDEBUG is defined (the non-debug case), assume is an empty statement (and temp_size does not occur):
and HAVE_ASSUME comes from libpolys/misc/auxiliary.h
Short: make clean and reconfigure should solve your problem - even for Yosemite and clang.