Closed ProgramFan closed 8 years ago
It seems the strdup
override conflict with the real strdup
in string.h
. Commenting out the strdup declaration in mtex2MML/deps/strdup/strdup.h
solves the problem.
Could you try installing with the environment variable MATHEMATICAL_SKIP_STRDUP
enabled, such as:
MATHEMATICAL_SKIP_STRDUP=1 gem install mathematical
This problem has begun recently and I confess I don't know what is causing it. I thought that the ifdef
in mtex2mml would take care of conflicts with strdup but that does not seem to be the case. strdup is not part of the C standard so I felt the need to include it. Perhaps I ought to rename the file (string_dupe
?) so that it does not conflict with existing implementations? Do you have any suggestions?
MATHEMATICAL_SKIP_STRDUP=1
solves the problem perfectly. I have tried to comment out the strdup line and it broke mtex2MML compilation (although the aforementioned file compiled). The CMakeLists.txt of mtex2MML also lacks proper support to detect HAVE_STRDUP
. If strdup
is only used internally by mtex2MML, I would suggest rename it.
The CMakeLists.txt of mtex2MML also lacks proper support to detect HAVE_STRDUP
I'm not sure what you mean by this but if you know of a fix, I would very much appreciate a pull request! https://github.com/gjtorikian/mtex2MML
I'll close this out for now since the original issue is solved and, pending an update to the CMakeLists file, I may just rename method to avoid conflict.
This fix does not work in macOS Mojave 10.14, and the gem cannot be installed.
Can also confirm this fix does not work in macOS Mojave 10.14.
gem install mathematical-1.6.7
fails on Fedora 24 (with gcc 6.1) with the following error: