Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'asciidoctor-mathematical' could not be loaded #23

Closed
harumo11 opened this issue Nov 20, 2016 · 13 comments
Closed

'asciidoctor-mathematical' could not be loaded #23

harumo11 opened this issue Nov 20, 2016 · 13 comments
Assignees
Labels

Comments

@harumo11
Copy link

Hello. everyone.

I want to write equations in my document.
When I executed this command:

$ asciidoctor-pdf --trace -r asciidoctor-mathematical -o test.pdf research.asciidoc

I got this error:

harumo@harumo-X250 ~/Documents/research $ asciidoctor-pdf --trace -r asciidoctor-mathematical -o test.pdf research.asciidoc 
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- asciidoctor-mathematical (LoadError)
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
	from /usr/lib/ruby/vendor_ruby/asciidoctor/cli/options.rb:219:in `block in parse!'
	from /usr/lib/ruby/vendor_ruby/asciidoctor/cli/options.rb:217:in `each'
	from /usr/lib/ruby/vendor_ruby/asciidoctor/cli/options.rb:217:in `parse!'
	from /var/lib/gems/2.3.0/gems/asciidoctor-pdf-1.5.0.alpha.13/bin/asciidoctor-pdf:25:in `<top (required)>'
	from /usr/local/bin/asciidoctor-pdf:23:in `load'
	from /usr/local/bin/asciidoctor-pdf:23:in `<main>'

I know next to nothing about asciidoc. but I know that it is a great tool for writing.
What am I doing wrong?

Thanks in advance.

@ProgramFan
Copy link
Contributor

What is the result of:

asciidoctor -r asciidoctor-pdf -r asciidoctor-mathematical -b pdf -o test.pdf research.asciidoc

?

@ProgramFan ProgramFan self-assigned this Nov 20, 2016
@harumo11
Copy link
Author

Hi. @ProgramFan

Bellow is my result.

harumo@harumo-X250 ~/Documents/research $ asciidoctor -r asciidoctor-pdf -r asciidoctor-mathematical -b pdf -o test.pdf research.asciidoc
asciidoctor: FAILED: 'asciidoctor-mathematical' could not be loaded
  Use --trace for backtrace

And When I use --trace option, I get following result.

harumo@harumo-X250 ~/Documents/research $ asciidoctor --trace -r asciidoctor-pdf -r asciidoctor-mathematical -b pdf -o test.pdf research.asciidoc
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- asciidoctor-mathematical (LoadError)
    from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /var/lib/gems/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/options.rb:219:in `block in parse!'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/options.rb:217:in `each'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/options.rb:217:in `parse!'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/options.rb:33:in `parse!'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/lib/asciidoctor/cli/invoker.rb:22:in `initialize'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/bin/asciidoctor:12:in `new'
    from /var/lib/gems/2.3.0/gems/asciidoctor-1.5.5/bin/asciidoctor:12:in `<top (required)>'
    from /usr/local/bin/asciidoctor:23:in `load'
    from /usr/local/bin/asciidoctor:23:in `<main>'

My environment is as bellow.

os ruby version asciidoctor version
Ubuntu 16.04 2.3.1 1.5.5

@ProgramFan
Copy link
Contributor

I have never met this before. I use asciidoctor-mathematical on macOS and Fedora 24 with rvm, and have no experiences of ruby on ubuntu. So the following are my guesses.

I doubt your installation of asciidoctor-mathematical is not clean. You may have updated your system but asciidoctor-mathematical and its dependencies are not updated, so load errors can occur. Does remove asciidoctor-mathematical and mathematical and reinstall them work?

@tstumm
Copy link
Contributor

tstumm commented Nov 21, 2016

Please post the output of gem list | grep asciidoctor-mathematical

If you don't get any result from this command try running gem install asciidoctor-mathematical.

@harumo11
Copy link
Author

@ProgramFan @tstumm

I run gem list | grep asciidoctor-mathematical command, but I get no result.
Then, I run this:gem install asciidoctor-mathematical .
It shows below error message.

harumo@harumo-X250 ~ $ sudo gem install asciidoctor-mathematicalBuilding native extensions.  This could take a while...
ERROR:  Error installing asciidoctor-mathematical:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical
/usr/bin/ruby2.3 -r ./siteconf20161123-5639-zm8nop.rb extconf.rb
checking for cmake... yes
checking for main() in -lxml2... yes
checking for main() in -lpangocairo-1.0... yes
checking for libxml/tree.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2... yes
checking for libxml/parser.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2... yes
checking for libxml/xpath.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2... yes
checking for libxml/xpathInternals.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2... yes
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found BISON: /usr/bin/bison (found version "3.0.4") 
-- Found FLEX: /usr/bin/flex (found version "2.6.0") 
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Configuring done
-- Generating done
-- Build files have been written to: /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/build
[ 11%] [FLEX][MTEX2MMLSCANNER] Building scanner with flex 2.6.0
[ 22%] [BISON][MTEX2MMLPARSER] Building parser with bison 3.0.4
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y: warning: 5270 shift/reduce conflicts [-Wconflicts-sr]
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y: warning: 613 reduce/reduce conflicts [-Wconflicts-rr]
Scanning dependencies of target libmtex2MML_static
[ 33%] Building C object CMakeFiles/libmtex2MML_static.dir/src/environment.c.o
In file included from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.h:5:0,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:7:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c: In function ‘mtex2MML_perform_replacement’:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:91: warning: signed and unsigned type in conditional expression [-Wsign-compare]
 #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
                                                                                           ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:62: note: in expansion of macro ‘utarray_eltidx’
 #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
                                                              ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:309:22: note: in expansion of macro ‘utarray_prev’
   while ( (o=(char**)utarray_prev(rowlines_stack,o))) {
                      ^
In file included from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.h:5:0,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:7:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:91: warning: signed and unsigned type in conditional expression [-Wsign-compare]
 #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
                                                                                           ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:122:56: note: in definition of macro ‘_utarray_eltptr’
 #define _utarray_eltptr(a,j) ((a)->d + ((a)->icd.sz * (j)))
                                                        ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:107: note: in expansion of macro ‘utarray_eltidx’
 #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
                                                                                                           ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:309:22: note: in expansion of macro ‘utarray_prev’
   while ( (o=(char**)utarray_prev(rowlines_stack,o))) {
                      ^
In file included from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.h:5:0,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:7:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:91: warning: signed and unsigned type in conditional expression [-Wsign-compare]
 #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
                                                                                           ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:62: note: in expansion of macro ‘utarray_eltidx’
 #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
                                                              ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:322:22: note: in expansion of macro ‘utarray_prev’
   while ( (p=(char**)utarray_prev(row_spacing_stack,p))) {
                      ^
In file included from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.h:5:0,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:7:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:91: warning: signed and unsigned type in conditional expression [-Wsign-compare]
 #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
                                                                                           ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:122:56: note: in definition of macro ‘_utarray_eltptr’
 #define _utarray_eltptr(a,j) ((a)->d + ((a)->icd.sz * (j)))
                                                        ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:107: note: in expansion of macro ‘utarray_eltidx’
 #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
                                                                                                           ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.c:322:22: note: in expansion of macro ‘utarray_prev’
   while ( (p=(char**)utarray_prev(row_spacing_stack,p))) {
                      ^
[ 44%] Building C object CMakeFiles/libmtex2MML_static.dir/src/colors.c.o
[ 55%] Building C object CMakeFiles/libmtex2MML_static.dir/src/em.c.o
[ 66%] Building C object CMakeFiles/libmtex2MML_static.dir/src/string_extras.c.o
[ 77%] Building C object CMakeFiles/libmtex2MML_static.dir/parser.c.o
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y: In function ‘mtex2MML_yyerror’:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y:56:30: warning: unused parameter ‘ret_str’ [-Wunused-parameter]
  static void yyerror (char **ret_str, const char * s)
                              ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y: At top level:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y:68:14: warning: ‘mtex2MML_default_write’ defined but not used [-Wunused-function]
  static void mtex2MML_default_write (const char * buffer, unsigned long length)
              ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/parser.y:79:14: warning: ‘mtex2MML_default_write_mathml’ defined but not used [-Wunused-function]
  static void mtex2MML_default_write_mathml (const char * mathml)
              ^
[ 88%] Building C object CMakeFiles/libmtex2MML_static.dir/lexer.c.o
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/build/lexer.c: In function ‘yy_get_next_buffer’:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/build/lexer.c:8042:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if ( number_to_move == YY_MORE_ADJ )
                       ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/build/lexer.c:8059:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
                                            ^
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/lexer.l: At top level:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/build/lexer.c:8178:16: warning: ‘input’ defined but not used [-Wunused-function]
     static int input  (void)
                ^
[100%] Linking C static library libmtex2MML.a
[100%] Built target libmtex2MML_static
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'glib-2.0'
--   Found glib-2.0, version 2.48.1
-- Checking for module 'cairo'
--   Found cairo, version 1.14.6
-- Checking for module 'pango'
--   Found pango, version 1.38.1
-- Checking for module 'gdk-pixbuf-2.0'
--   Found gdk-pixbuf-2.0, version 2.32.2
-- Checking for module 'libxml-2.0'
--   Found libxml-2.0, version 2.9.3
-- Checking for module 'gio-2.0'
--   Found gio-2.0, version 2.48.1
-- Checking for module 'pangocairo'
--   Found pangocairo, version 1.38.1
-- Configuring done
-- Generating done
-- Build files have been written to: /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/lasem/build
Scanning dependencies of target lasem
[  0%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvglineelement.c.o
[  1%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterconvolvematrix.c.o
[  2%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdebug.c.o
[  3%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmtraits.c.o
[  4%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvglineargradientelement.c.o
[  5%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlspaceelement.c.o
[  6%] Building C object CMakeFiles/lasem.dir/lasem/src/lsm.c.o
[  7%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvggelement.c.o
[  8%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltercomposite.c.o
[  9%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvguseelement.c.o
[  9%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlalignmarkelement.c.o
[ 10%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltercolormatrix.c.o
[ 11%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpatternelement.c.o
[ 12%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgimageelement.c.o
[ 13%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtspanelement.c.o
[ 14%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterblend.c.o
[ 15%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltersurface.c.o
[ 16%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvggradientelement.c.o
[ 17%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterspecularlighting.c.o
[ 18%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlattributes.c.o
[ 18%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomentities.c.o
[ 19%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlstyle.c.o
[ 20%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlpresentationtoken.c.o
[ 21%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomelement.c.o
[ 22%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmproperties.c.o
[ 23%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgenums.c.o
[ 24%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmcairo.c.o
[ 25%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmstr.c.o
[ 26%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgstyle.c.o
[ 27%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmllayoututils.c.o
[ 27%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlerrorelement.c.o
[ 28%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlview.c.o
[ 29%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltraits.c.o
[ 30%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomtext.c.o
[ 31%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterimage.c.o
[ 32%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtextelement.c.o
[ 33%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlfractionelement.c.o
[ 34%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmutils.c.o
[ 35%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpathelement.c.o
[ 36%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgcircleelement.c.o
[ 36%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlaligngroupelement.c.o
[ 37%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlunderoverelement.c.o
[ 38%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlenums.c.o
[ 39%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgmaskelement.c.o
[ 40%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltermerge.c.o
[ 41%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgmarkerelement.c.o
[ 42%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltergaussianblur.c.o
[ 43%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgmatrix.c.o
[ 44%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgswitchelement.c.o
[ 45%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlelement.c.o
[ 45%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgrectelement.c.o
[ 46%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlglyphtableams.c.o
[ 47%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlrowelement.c.o
[ 48%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpolygonelement.c.o
[ 49%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomparser.c.o
[ 50%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgsvgelement.c.o
[ 51%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlscriptelement.c.o
[ 52%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlencloseelement.c.o
[ 53%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltableelement.c.o
[ 54%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlutils.c.o
[ 54%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmattributes.c.o
[ 55%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltermergenode.c.o
[ 56%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterelement.c.o
[ 57%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltertile.c.o
[ 58%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomnodelist.c.o
[ 59%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpolylineelement.c.o
[ 60%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgsymbolelement.c.o
[ 61%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlmathelement.c.o
[ 62%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlsemanticselement.c.o
[ 63%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgaelement.c.o
[ 63%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmloperatorelement.c.o
[ 64%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgclippathelement.c.o
[ 65%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterturbulence.c.o
[ 66%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlstringelement.c.o
[ 67%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomimplementation.c.o
[ 68%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomdocumentfragment.c.o
[ 69%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlstyleelement.c.o
[ 70%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmloperatordictionary.c.o
[ 71%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgcolors.c.o
[ 72%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlfencedelement.c.o
[ 72%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltermorphology.c.o
[ 73%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmldocument.c.o
[ 74%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterdisplacementmap.c.o
[ 75%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvglength.c.o
[ 76%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlpaddedelement.c.o
[ 77%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlradicalelement.c.o
[ 78%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgelement.c.o
[ 79%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterprimitive.c.o
[ 80%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgdefselement.c.o
[ 81%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltablerowelement.c.o
[ 81%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgellipseelement.c.o
[ 82%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtraits.c.o
[ 83%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomdocument.c.o
[ 84%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtransformable.c.o
[ 85%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgradialgradientelement.c.o
[ 86%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlphantomelement.c.o
[ 87%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlitexelement.c.o
[ 88%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgview.c.o
[ 89%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlactionelement.c.o
[ 90%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomview.c.o
[ 90%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomcharacterdata.c.o
[ 91%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomnode.c.o
[ 92%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlpresentationcontainer.c.o
[ 93%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgdocument.c.o
[ 94%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterflood.c.o
[ 95%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomnamednodemap.c.o
[ 96%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilteroffset.c.o
[ 97%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgstopelement.c.o
[ 98%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltablecellelement.c.o
[ 99%] Building C object CMakeFiles/lasem.dir/lasem_overrides.c.o
[100%] Linking C shared library liblasem.so
[100%] Built target lasem
checking for mtex2MML.h in /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/mathematical-1.6.7/mkmf.log

current directory: /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical
make "DESTDIR=" clean

current directory: /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical
make "DESTDIR="
compiling cairo_callbacks.c
compiling lasem_overrides.c
In file included from /usr/include/string.h:630:0,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/uthash.h:29,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.h:4,
                 from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/mtex2MML.h:12,
                 from lasem_overrides.c:5:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/../strdup/strdup.h:24:1: error: expected identifier or ‘(’ before ‘__extension__’
 strdup(const char *str);
 ^
Makefile:239: recipe for target 'lasem_overrides.o' failed
make: *** [lasem_overrides.o] Error 1

make failed, exit code 2

Gem files will remain installed in /var/lib/gems/2.3.0/gems/mathematical-1.6.7 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/mathematical-1.6.7/gem_make.out

I also tried to remove and re-install asciidoctor and asciidoctor-mathematical.
But, I got same result.

@ProgramFan
Copy link
Contributor

See gjtorikian/mathematical#64

@ProgramFan
Copy link
Contributor

Since this is not a problem of asciidoctor-mathematical, I will close this issue, but feel free to ask new questions.

@harumo11
Copy link
Author

Thank you.
I solved the problem.

@mojavelinux
Copy link
Member

Can you please document this in the README?

@mojavelinux
Copy link
Member

I can confirm that the fix proposed by Garen works, but it would have saved me time had I seen it in the README first.

@mojavelinux
Copy link
Member

@ProgramFan Thanks!

@akosma
Copy link

akosma commented Oct 21, 2018

This fix does not work on macOS Mojave 10.14, and the gem does not work on it. I've reported this to the mathematical maintainers too.

@ProgramFan
Copy link
Contributor

This shall go to mathematical indeed. I don't understand why someone would override strdup. This type of tricks always introduces nasty bugs and compatibility problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants