asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
50 stars 45 forks source link

Cannot install on arch linux. #112

Open jfab20 opened 2 years ago

jfab20 commented 2 years ago

I think I have all dependecies installed. I tried to install the package with gem install asciidoctor-mathematical and I get a bunch of errors. Any help? This also happens when trying to install mathematical.

ERROR:  Error installing asciidoctor-mathematical:
    ERROR: Failed to build gem native extension.

    current directory: /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical
/usr/bin/ruby -I /usr/lib/ruby/3.0.0 -r ./siteconf20220607-9258-orpgbq.rb extconf.rb
checking for cmake... yes
checking for -lxml2... yes
checking for -lpangocairo-1.0... yes
checking for libxml/tree.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for libxml/parser.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for libxml/xpath.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
checking for libxml/xpathInternals.h in /include/libxml2,/usr/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... yes
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Found BISON: /usr/bin/bison (found version "3.8.2") 
-- Found FLEX: /usr/bin/flex (found version "2.6.4") 
-- 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 "3.10.4") 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/build
[ 10%] [BISON][MTEX2MMLPARSER] Building parser with bison 3.8.2
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y: warning: 5280 shift/reduce conflicts [-Wconflicts-sr]
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y: warning: 613 reduce/reduce conflicts [-Wconflicts-rr]
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
[ 20%] [FLEX][MTEX2MMLSCANNER] Building scanner with flex 2.6.4
[ 30%] Building C object CMakeFiles/libmtex2MML_static.dir/src/colors.c.o
[ 40%] Building C object CMakeFiles/libmtex2MML_static.dir/src/em.c.o
[ 50%] Building C object CMakeFiles/libmtex2MML_static.dir/src/environment.c.o
In file included from /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.h:5,
                 from /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.c:7:
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.c: In function ‘mtex2MML_perform_replacement’:
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:93: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘long unsigned int’ due to unsignedness of other operand [-Wsign-compare]
  223 | #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
      |                                                                                             ^~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:62: note: in expansion of macro ‘utarray_eltidx’
  221 | #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
      |                                                              ^~~~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.c:309:22: note: in expansion of macro ‘utarray_prev’
  309 |   while ( (o=(char**)utarray_prev(rowlines_stack,o))) {
      |                      ^~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:93: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘long unsigned int’ due to unsignedness of other operand [-Wsign-compare]
  223 | #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
      |                                                                                             ^~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:122:56: note: in definition of macro ‘_utarray_eltptr’
  122 | #define _utarray_eltptr(a,j) ((a)->d + ((a)->icd.sz * (j)))
      |                                                        ^
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:107: note: in expansion of macro ‘utarray_eltidx’
  221 | #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
      |                                                                                                           ^~~~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.c:309:22: note: in expansion of macro ‘utarray_prev’
  309 |   while ( (o=(char**)utarray_prev(rowlines_stack,o))) {
      |                      ^~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:93: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘long unsigned int’ due to unsignedness of other operand [-Wsign-compare]
  223 | #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
      |                                                                                             ^~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:62: note: in expansion of macro ‘utarray_eltidx’
  221 | #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
      |                                                              ^~~~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.c:322:22: note: in expansion of macro ‘utarray_prev’
  322 |   while ( (p=(char**)utarray_prev(row_spacing_stack,p))) {
      |                      ^~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:223:93: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘long unsigned int’ due to unsignedness of other operand [-Wsign-compare]
  223 | #define utarray_eltidx(a,e) (((char*)(e) >= (a)->d) ? (((char*)(e) - (a)->d)/(a)->icd.sz) : -1)
      |                                                                                             ^~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:122:56: note: in definition of macro ‘_utarray_eltptr’
  122 | #define _utarray_eltptr(a,j) ((a)->d + ((a)->icd.sz * (j)))
      |                                                        ^
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/../deps/uthash/utarray.h:221:107: note: in expansion of macro ‘utarray_eltidx’
  221 | #define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
      |                                                                                                           ^~~~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/environment.c:322:22: note: in expansion of macro ‘utarray_prev’
  322 |   while ( (p=(char**)utarray_prev(row_spacing_stack,p))) {
      |                      ^~~~~~~~~~~~
[ 60%] Building C object CMakeFiles/libmtex2MML_static.dir/src/string_dup.c.o
[ 70%] Building C object CMakeFiles/libmtex2MML_static.dir/src/string_extras.c.o
[ 80%] Building C object CMakeFiles/libmtex2MML_static.dir/parser.c.o
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y: In function ‘mtex2MML_yyerror’:
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y:56:30: warning: unused parameter ‘ret_str’ [-Wunused-parameter]
   56 |  static void yyerror (char **ret_str, const char * s)
      |                       ~~~~~~~^~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y: At top level:
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y:79:14: warning: ‘mtex2MML_default_write_mathml’ defined but not used [-Wunused-function]
   79 |  static void mtex2MML_default_write_mathml (const char * mathml)
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src/parser.y:68:14: warning: ‘mtex2MML_default_write’ defined but not used [-Wunused-function]
   68 |  static void mtex2MML_default_write (const char * buffer, unsigned long length)
      |              ^~~~~~~~~~~~~~~~~~~~~~
[ 90%] Building C object CMakeFiles/libmtex2MML_static.dir/lexer.c.o
/home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/build/lexer.c:8455:16: warning: ‘input’ defined but not used [-Wunused-function]
 8455 | #else
      |                ^    
[100%] Linking C static library libmtex2MML.a
[100%] Built target libmtex2MML_static
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:8 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for module 'glib-2.0'
--   Found glib-2.0, version 2.72.2
-- Checking for module 'cairo'
--   Found cairo, version 1.17.6
-- Checking for module 'pango'
--   Found pango, version 1.50.7
-- Checking for module 'gdk-pixbuf-2.0'
--   Found gdk-pixbuf-2.0, version 2.42.8
-- Checking for module 'libxml-2.0'
--   Found libxml-2.0, version 2.9.14
-- Checking for module 'gio-2.0'
--   Found gio-2.0, version 2.72.2
-- Checking for module 'pangocairo'
--   Found pangocairo, version 1.50.7
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/lasem/build
[  0%] Building C object CMakeFiles/lasem.dir/lasem/src/lsm.c.o
[  1%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmattributes.c.o
[  2%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmcairo.c.o
[  3%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdebug.c.o
[  4%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomcharacterdata.c.o
[  5%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomdocument.c.o
[  6%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomdocumentfragment.c.o
[  7%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomelement.c.o
[  8%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomentities.c.o
[  9%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomimplementation.c.o
[  9%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomnamednodemap.c.o
[ 10%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomnode.c.o
[ 11%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomnodelist.c.o
[ 12%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomparser.c.o
[ 13%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomtext.c.o
[ 14%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmdomview.c.o
[ 15%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlactionelement.c.o
[ 16%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlaligngroupelement.c.o
[ 17%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlalignmarkelement.c.o
[ 18%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlattributes.c.o
[ 18%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmldocument.c.o
[ 19%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlelement.c.o
[ 20%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlencloseelement.c.o
[ 21%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlenums.c.o
[ 22%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlerrorelement.c.o
[ 23%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlfencedelement.c.o
[ 24%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlfractionelement.c.o
[ 25%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlglyphtableams.c.o
[ 26%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlitexelement.c.o
[ 27%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmllayoututils.c.o
[ 27%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlmathelement.c.o
[ 28%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmloperatordictionary.c.o
[ 29%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmloperatorelement.c.o
[ 30%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlpaddedelement.c.o
[ 31%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlphantomelement.c.o
[ 32%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlpresentationcontainer.c.o
[ 33%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlpresentationtoken.c.o
[ 34%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlradicalelement.c.o
[ 35%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlrowelement.c.o
[ 36%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlscriptelement.c.o
[ 36%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlsemanticselement.c.o
[ 37%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlspaceelement.c.o
[ 38%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlstringelement.c.o
[ 39%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlstyle.c.o
[ 40%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlstyleelement.c.o
[ 41%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltablecellelement.c.o
[ 42%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltableelement.c.o
[ 43%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltablerowelement.c.o
[ 44%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmltraits.c.o
[ 45%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlunderoverelement.c.o
[ 45%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlutils.c.o
[ 46%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmmathmlview.c.o
[ 47%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmproperties.c.o
[ 48%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmstr.c.o
[ 49%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgaelement.c.o
[ 50%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgcircleelement.c.o
[ 51%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgclippathelement.c.o
[ 52%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgcolors.c.o
[ 53%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgdefselement.c.o
[ 54%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgdocument.c.o
[ 54%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgelement.c.o
[ 55%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgellipseelement.c.o
[ 56%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgenums.c.o
[ 57%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterblend.c.o
[ 58%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltercolormatrix.c.o
[ 59%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltercomposite.c.o
[ 60%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterconvolvematrix.c.o
[ 61%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterdisplacementmap.c.o
[ 62%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterelement.c.o
[ 63%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterflood.c.o
[ 63%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltergaussianblur.c.o
[ 64%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterimage.c.o
[ 65%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltermerge.c.o
[ 66%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltermergenode.c.o
[ 67%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltermorphology.c.o
[ 68%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilteroffset.c.o
[ 69%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterprimitive.c.o
[ 70%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterspecularlighting.c.o
[ 71%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltersurface.c.o
[ 72%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfiltertile.c.o
[ 72%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgfilterturbulence.c.o
[ 73%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvggelement.c.o
[ 74%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvggradientelement.c.o
[ 75%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgimageelement.c.o
[ 76%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvglength.c.o
[ 77%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvglineargradientelement.c.o
[ 78%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvglineelement.c.o
[ 79%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgmarkerelement.c.o
[ 80%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgmaskelement.c.o
[ 81%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgmatrix.c.o
[ 81%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpathelement.c.o
[ 82%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpatternelement.c.o
[ 83%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpolygonelement.c.o
[ 84%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgpolylineelement.c.o
[ 85%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgradialgradientelement.c.o
[ 86%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgrectelement.c.o
[ 87%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgstopelement.c.o
[ 88%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgstyle.c.o
[ 89%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgsvgelement.c.o
[ 90%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgswitchelement.c.o
[ 90%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgsymbolelement.c.o
[ 91%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtextelement.c.o
[ 92%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtraits.c.o
[ 93%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtransformable.c.o
[ 94%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgtspanelement.c.o
[ 95%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvguseelement.c.o
[ 96%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmsvgview.c.o
[ 97%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmtraits.c.o
[ 98%] Building C object CMakeFiles/lasem.dir/lasem/src/lsmutils.c.o
[ 99%] Building C object CMakeFiles/lasem.dir/lasem_overrides.c.o
[100%] Linking C shared library liblasem.so
[100%] Built target lasem
*** Library work completed ***
checking for mtex2MML.h in /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/mtex2MML/src... yes
creating Makefile

current directory: /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical
make DESTDIR\= clean

current directory: /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical
make DESTDIR\=
compiling cairo_callbacks.c
compiling lasem_overrides.c
compiling mathematical.c
In file included from ./mathematical.h:15,
                 from mathematical.c:23:
/usr/include/glib-2.0/glib/gi18n.h:26: warning: "_" redefined
   26 | #define  _(String) gettext (String)
      | 
In file included from /usr/include/ruby-3.0.0/ruby/defines.h:78,
                 from /usr/include/ruby-3.0.0/ruby/ruby.h:23,
                 from /usr/include/ruby-3.0.0/ruby.h:38,
                 from ./mathematical.h:4:
/usr/include/ruby-3.0.0/ruby/backward/2/stdarg.h:29: note: this is the location of the previous definition
   29 | # define _(args) args
      | 
mathematical.c: In function ‘process’:
mathematical.c:138:77: warning: passing argument 2 of ‘cairo_svg_surface_create_for_stream’ makes pointer from integer without a cast [-Wint-conversion]
  138 |     surface = cairo_svg_surface_create_for_stream (cairoSvgSurfaceCallback, self, width_pt, height_pt);
      |                                                                             ^~~~
      |                                                                             |
      |                                                                             VALUE {aka long unsigned int}
In file included from ./mathematical.h:18:
/usr/include/cairo/cairo-svg.h:102:57: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
  102 |                                      void              *closure,
      |                                      ~~~~~~~~~~~~~~~~~~~^~~~~~~
mathematical.c:149:91: warning: passing argument 3 of ‘cairo_surface_write_to_png_stream’ makes pointer from integer without a cast [-Wint-conversion]
  149 |     cairo_surface_write_to_png_stream (cairo_get_target (cairo), cairoPngSurfaceCallback, self);
      |                                                                                           ^~~~
      |                                                                                           |
      |                                                                                           VALUE {aka long unsigned int}
In file included from /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/lasem/src/lsmcairo.h:28,
                 from /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14/ext/mathematical/lasem/src/lsm.h:29,
                 from ./mathematical.h:11:
/usr/include/cairo/cairo.h:2492:58: note: expected ‘void *’ but argument is of type ‘VALUE’ {aka ‘long unsigned int’}
 2492 |                                    void                 *closure);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
mathematical.c: In function ‘MATHEMATICAL_process’:
mathematical.c:234:40: warning: passing argument 2 of ‘rb_rescue’ makes integer from pointer without a cast [-Wint-conversion]
  234 |     output = rb_rescue(process_helper, args, process_rescue, rb_Input);
      |                                        ^~~~
      |                                        |
      |                                        VALUE * {aka long unsigned int *}
In file included from /usr/include/ruby-3.0.0/ruby/ruby.h:38:
/usr/include/ruby-3.0.0/ruby/internal/iterator.h:50:33: note: expected ‘VALUE’ {aka ‘long unsigned int’} but argument is of type ‘VALUE *’ {aka ‘long unsigned int *’}
   50 | VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
      |                                 ^~~~~
mathematical.c:258:40: warning: passing argument 2 of ‘rb_rescue’ makes integer from pointer without a cast [-Wint-conversion]
  258 |       hash = rb_rescue(process_helper, args, process_rescue, math);
      |                                        ^~~~
      |                                        |
      |                                        VALUE * {aka long unsigned int *}
/usr/include/ruby-3.0.0/ruby/internal/iterator.h:50:33: note: expected ‘VALUE’ {aka ‘long unsigned int’} but argument is of type ‘VALUE *’ {aka ‘long unsigned int *’}
   50 | VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
      |                                 ^~~~~
mathematical.c:267:12: warning: assignment to ‘VALUE’ {aka ‘long unsigned int’} from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
  267 |     output = NULL;
      |            ^
linking shared-object mathematical/mathematical.so
/usr/bin/ld: cannot find -ljbig: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:262: mathematical.so] Error 1

make failed, exit code 2

Gem files will remain installed in /home/jfab/.local/share/gem/ruby/3.0.0/gems/mathematical-1.6.14 for inspection.
Results logged to /home/jfab/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/mathematical-1.6.14/gem_make.out
jfab20 commented 2 years ago

Solved! As referenced in here https://github.com/gjtorikian/mathematical/issues/106 you are missing a dependency for arch linux. It's jbigkit. So doing sudo pacman -S jbigkit does the trick. You should put this in the dependencies list.

adrfantini commented 2 years ago

Same. I personally needed to install:

Not sure if there are other deps that I already had installed. Anyway, after that I got fonts problems (see #113), and decided that the cleanest way was to use docker:

docker pull asciidoctor/docker-asciidoctor
docker run -it -v $YOUR_FOLDER/:/documents/ asciidoctor/docker-asciidoctor
# then you can run for example:
asciidoctor-pdf -r asciidoctor-mathematical test.adoc