manuels / texlive.js

Compiling LaTeX (TeX live) in your browser
http://manuels.github.com/texlive.js/
GNU General Public License v2.0
1.25k stars 140 forks source link

Building texlive.js #66

Open Jamtis opened 1 year ago

Jamtis commented 1 year ago

texlive.js is a great project but I cannot compile it despite various attempts. It would be really nice if somebody that is able to build (any version of) texlive.js could provide some guidance.

Here's what I tried so far (on an ubuntu docker image using @jacbrzam's fork):

git clone --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
git clone --depth 1 --shallow-submodules --recurse-submodules --remote-submodules git@github.com:jacbrzam/texlive.js.git
cd texlive.js
make

This yields the following error

...
make pdftex
cp -rfp binary/{tangle,tie,web2c} build/texk/web2c/
cd build/texk/web2c && emmake make -j pdftex  -o tangle -o tie -o web2c -o web2c/makecpool &>pdftex.log
cp build/texk/web2c/pdftex ./pdftex.bc # emcc will call wasm-opt now, no need to call ourselves
create pdftex worker
#OBJFILES=$(for i in `find build/texk/web2c/lib build/texk/kpathsea -name '*.o'` ; do llvm-nm $i | grep main >/dev/null || echo $i ; done) && \
        emcc  --memory-init-file 0 -v --closure 1 -s TOTAL_MEMORY=$((128*1024*1024)) -O3  pdftex.bc -s INVOKE_RUN=0 --pre-js pdftex-pre.js --post-js pdftex-post.js -o pdftex-worker.js -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s SINGLE_FILE=1 -g1
 "/emsdk/upstream/bin/clang" --version
 "/emsdk/upstream/bin/wasm-ld" -o pdftex-worker.wasm pdftex.bc -L/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=__errno_location --export-if-defined=__get_temp_ret --export-if-defined=__set_temp_ret --export-table -z stack-size=5242880 --initial-memory=134217728 --no-entry --max-memory=134217728 --global-base=1024
wasm-ld: error: unknown file type: pdftex.bc
emcc: error: '/emsdk/upstream/bin/wasm-ld -o pdftex-worker.wasm pdftex.bc -L/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=stackSave --export-if-defined=stackRestore --export-if-defined=stackAlloc --export-if-defined=__wasm_call_ctors --export-if-defined=__errno_location --export-if-defined=__get_temp_ret --export-if-defined=__set_temp_ret --export-table -z stack-size=5242880 --initial-memory=134217728 --no-entry --max-memory=134217728 --global-base=1024' failed (returned 1)
make: *** [Makefile:90: pdftex-worker.js] Error 1

What seems strange is that pdftex.bc is JavaScript file and not LLVM bitcode.

Similarly, on @manuels' branch I get the following error:

make[1]: Entering directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex'
Making all in .
make[2]: Entering directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex'
=== configuring in texk/kpathsea (/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/texk/kpathsea)
make: running /bin/bash '/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/texk/kpathsea/configure'  '--disable-option-checking' '--prefix=/usr/local' '--enable-native-texlive-build' '--enable-cxx-runtime-hack' '--disable-shared' '--disable-largefile' '--without-x' '--disable-ptex' '--without-system-freetype' '--without-system-freetype2' '--without-system-gd' '--without-system-graphite' '--without-system-icu' '--without-system-kpathsea' '--without-system-libpng' '--without-system-ptexenc' '--without-system-t1lib' '--without-system-teckit' '--without-system-xpdf' '--without-system-zlib' '--disable-all-pkgs' '--enable-pdftex' '--enable-static' 'CC=emcc' 'CFLAGS=-DELIDE_CODE' 'CXX=/emsdk/upstream/emscripten/em++' '--enable-multiplatform=yes' '--enable-libtool-hack=yes' '--enable-texlive-build' '--bindir=${exec_prefix}/bin/x86_64-unknown-linux-gnu' '--libdir=${exec_prefix}/lib/x86_64-unknown-linux-gnu' '--enable-chktex=no' '--enable-dialog=no' '--enable-ps2eps=no' '--enable-psutils=no' '--enable-t1utils=no' '--enable-tpic2pdftex=no' '--enable-vlna=no' '--enable-xindy=no' '--with-clisp-runtime=default' '--disable-xpdfopen' '--enable-web2c=no' '--enable-afm2pl=no' '--enable-bibtex8=no' '--enable-bibtexu=no' '--enable-cjkutils=no' '--enable-detex=no' '--enable-devnag=no' '--enable-dtl=no' '--enable-dvi2tty=no' '--enable-dvidvi=no' '--enable-dviljk=no' '--enable-dvipdfmx=no' '--enable-dvipng=no' '--enable-dvipos=no' '--enable-dvipsk=no' '--enable-dvisvgm=no' '--enable-gsftopk=no' '--enable-lacheck=no' '--enable-lcdf-typetools=no' '--enable-makeindexk=no' '--enable-makejvf=no' '--enable-mendexk=no' '--enable-musixflx=no' '--enable-ps2pkm=no' '--enable-seetexk=no' '--enable-tex4htk=no' '--enable-ttf2pk=no' '--enable-ttfdump=no' '--enable-xdv2pdf=no' '--disable-xdvik' '--enable-xdvipdfmx=no' '--enable-tetex=no' '--enable-texlive=no' '--with-system-zziplib=no' '--mandir=${prefix}/texmf/doc/man' '--infodir=${prefix}/texmf/doc/info' '--cache-file=../../config.cache' '--srcdir=/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/texk/kpathsea' --disable-build
configure: loading cache ../../config.cache
checking for a BSD-compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /usr/bin/mkdir -p
checking for gawk... (cached) mawk
checking whether make sets $(MAKE)... (cached) yes
checking build system type... (cached) x86_64-unknown-linux-gnu
checking host system type... (cached) x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... (cached) emcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether emcc accepts -g... (cached) yes
checking for emcc option to accept ISO C89... (cached) none needed
checking dependency style of emcc... (cached) gcc3
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/grep -E
checking for fgrep... (cached) /usr/bin/grep -F
checking for ld used by emcc... (cached) /emsdk/upstream/emscripten/emcc
checking if the linker (/emsdk/upstream/emscripten/emcc) is GNU ld... (cached) yes
checking for BSD- or MS-compatible name lister (nm)... (cached) /emsdk/upstream/bin/llvm-nm
checking the name lister (/emsdk/upstream/bin/llvm-nm) interface... (cached) BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /emsdk/upstream/emscripten/emcc option to reload object files... (cached) -r
checking for objdump... (cached) objdump
checking how to recognize dependent libraries... (cached) pass_all
checking for ar... (cached) /emsdk/upstream/emscripten/emar
checking for strip... (cached) strip
checking for ranlib... (cached) /emsdk/upstream/emscripten/emranlib
checking command to parse /emsdk/upstream/bin/llvm-nm output from emcc object... (cached) ok
checking how to run the C preprocessor... (cached) emcc -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for dlfcn.h... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for objdir... (cached) .libs
checking if emcc supports -fno-rtti -fno-exceptions... (cached) yes
checking for emcc option to produce PIC... -fPIC -DPIC
checking if emcc PIC flag -fPIC -DPIC works... (cached) yes
checking if emcc static flag -static works... (cached) yes
checking if emcc supports -c -o file.o... (cached) yes
checking if emcc supports -c -o file.o... (cached) yes
checking whether the emcc linker (/emsdk/upstream/emscripten/emcc) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for _LARGEFILE_SOURCE value needed for large files... (cached) no
checking for dirent.h that defines DIR... (cached) yes
checking for library containing opendir... (cached) none required
checking for ANSI C header files... (cached) yes
checking whether closedir returns void... (cached) no
checking for assert.h... (cached) yes
checking for float.h... (cached) yes
checking for limits.h... (cached) yes
checking for memory.h... (cached) yes
checking for pwd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for unistd.h... (cached) yes
checking for putenv... (cached) yes
checking for strcasecmp... (cached) yes
checking for strtol... (cached) yes
checking for strstr... (cached) yes
checking for bcmp... (cached) yes
checking for bcopy... (cached) yes
checking for bzero... (cached) yes
checking for getcwd... (cached) yes
checking for getwd... (cached) no
checking for index... (cached) yes
checking for memcmp... (cached) yes
checking for memcpy... (cached) yes
checking for mkstemp... (cached) yes
checking for mktemp... (cached) yes
checking for rindex... (cached) yes
checking for strchr... (cached) yes
checking for strrchr... (cached) yes
checking for an ANSI C-conforming const... (cached) yes
checking for inline... (cached) inline
checking for size_t... (cached) yes
checking for struct stat.st_mtim... (cached) yes
checking whether the compiler accepts prototypes... (cached) yes
checking whether program_invocation_name is predefined... (cached) yes
checking what warning flags to pass to the C compiler... (cached) -Wimplicit -Wreturn-type
checking whether putenv is declared... yes
checking whether strstr is declared... yes
checking for putenv... (cached) yes
checking for strcasecmp... (cached) yes
checking for strtol... (cached) yes
checking for strstr... (cached) yes
checking whether getcwd uses fork or vfork... yes
checking for native WIN32 or MINGW32... (cached) no
configure: updating cache ../../config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating man/Makefile
config.status: creating c-auto.h
config.status: executing depfiles commands
config.status: executing libtool commands
make[2]: Leaving directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex'
Making all in libs
make[2]: Entering directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs'
Making all in .
make[3]: Entering directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs'
=== configuring in zlib (/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs/zlib)
make: running /bin/bash '/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/libs/zlib/configure'  '--disable-option-checking' '--prefix=/usr/local' '--enable-native-texlive-build' '--enable-cxx-runtime-hack' '--disable-shared' '--disable-largefile' '--without-x' '--disable-ptex' '--without-system-freetype' '--without-system-freetype2' '--without-system-gd' '--without-system-graphite' '--without-system-icu' '--without-system-kpathsea' '--without-system-libpng' '--without-system-ptexenc' '--without-system-t1lib' '--without-system-teckit' '--without-system-xpdf' '--without-system-zlib' '--disable-all-pkgs' '--enable-pdftex' '--enable-static' 'CC=emcc' 'CFLAGS=-DELIDE_CODE' 'CXX=/emsdk/upstream/emscripten/em++' '--enable-multiplatform=yes' '--enable-libtool-hack=yes' '--enable-texlive-build' '--bindir=${exec_prefix}/bin/x86_64-unknown-linux-gnu' '--libdir=${exec_prefix}/lib/x86_64-unknown-linux-gnu' '--enable-chktex=no' '--enable-dialog=no' '--enable-ps2eps=no' '--enable-psutils=no' '--enable-t1utils=no' '--enable-tpic2pdftex=no' '--enable-vlna=no' '--enable-xindy=no' '--with-clisp-runtime=default' '--disable-xpdfopen' '--enable-web2c=no' '--enable-afm2pl=no' '--enable-bibtex8=no' '--enable-bibtexu=no' '--enable-cjkutils=no' '--enable-detex=no' '--enable-devnag=no' '--enable-dtl=no' '--enable-dvi2tty=no' '--enable-dvidvi=no' '--enable-dviljk=no' '--enable-dvipdfmx=no' '--enable-dvipng=no' '--enable-dvipos=no' '--enable-dvipsk=no' '--enable-dvisvgm=no' '--enable-gsftopk=no' '--enable-lacheck=no' '--enable-lcdf-typetools=no' '--enable-makeindexk=no' '--enable-makejvf=no' '--enable-mendexk=no' '--enable-musixflx=no' '--enable-ps2pkm=no' '--enable-seetexk=no' '--enable-tex4htk=no' '--enable-ttf2pk=no' '--enable-ttfdump=no' '--enable-xdv2pdf=no' '--disable-xdvik' '--enable-xdvipdfmx=no' '--enable-tetex=no' '--enable-texlive=no' '--with-system-zziplib=no' '--mandir=${prefix}/texmf/doc/man' '--infodir=${prefix}/texmf/doc/info' '--cache-file=../../config.cache' '--srcdir=/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/libs/zlib' --disable-build
configure: loading cache ../../config.cache
checking for a BSD-compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /usr/bin/mkdir -p
checking for gawk... (cached) mawk
checking whether make sets $(MAKE)... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) emcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether emcc accepts -g... (cached) yes
checking for emcc option to accept ISO C89... (cached) none needed
checking for style of include used by make... GNU
checking dependency style of emcc... (cached) gcc3
checking for ranlib... (cached) /emsdk/upstream/emscripten/emranlib
checking whether ln -s works... yes
checking how to run the C preprocessor... (cached) emcc -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/grep -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking for mmap support... yes
configure: updating cache ../../config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing zconf.h commands
=== configuring in libpng (/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs/libpng)
make: running /bin/bash '/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/libs/libpng/configure'  '--disable-option-checking' '--prefix=/usr/local' '--enable-native-texlive-build' '--enable-cxx-runtime-hack' '--disable-shared' '--disable-largefile' '--without-x' '--disable-ptex' '--without-system-freetype' '--without-system-freetype2' '--without-system-gd' '--without-system-graphite' '--without-system-icu' '--without-system-kpathsea' '--without-system-libpng' '--without-system-ptexenc' '--without-system-t1lib' '--without-system-teckit' '--without-system-xpdf' '--without-system-zlib' '--disable-all-pkgs' '--enable-pdftex' '--enable-static' 'CC=emcc' 'CFLAGS=-DELIDE_CODE' 'CXX=/emsdk/upstream/emscripten/em++' '--enable-multiplatform=yes' '--enable-libtool-hack=yes' '--enable-texlive-build' '--bindir=${exec_prefix}/bin/x86_64-unknown-linux-gnu' '--libdir=${exec_prefix}/lib/x86_64-unknown-linux-gnu' '--enable-chktex=no' '--enable-dialog=no' '--enable-ps2eps=no' '--enable-psutils=no' '--enable-t1utils=no' '--enable-tpic2pdftex=no' '--enable-vlna=no' '--enable-xindy=no' '--with-clisp-runtime=default' '--disable-xpdfopen' '--enable-web2c=no' '--enable-afm2pl=no' '--enable-bibtex8=no' '--enable-bibtexu=no' '--enable-cjkutils=no' '--enable-detex=no' '--enable-devnag=no' '--enable-dtl=no' '--enable-dvi2tty=no' '--enable-dvidvi=no' '--enable-dviljk=no' '--enable-dvipdfmx=no' '--enable-dvipng=no' '--enable-dvipos=no' '--enable-dvipsk=no' '--enable-dvisvgm=no' '--enable-gsftopk=no' '--enable-lacheck=no' '--enable-lcdf-typetools=no' '--enable-makeindexk=no' '--enable-makejvf=no' '--enable-mendexk=no' '--enable-musixflx=no' '--enable-ps2pkm=no' '--enable-seetexk=no' '--enable-tex4htk=no' '--enable-ttf2pk=no' '--enable-ttfdump=no' '--enable-xdv2pdf=no' '--disable-xdvik' '--enable-xdvipdfmx=no' '--enable-tetex=no' '--enable-texlive=no' '--with-system-zziplib=no' '--mandir=${prefix}/texmf/doc/man' '--infodir=${prefix}/texmf/doc/info' '--cache-file=../../config.cache' '--srcdir=/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/libs/libpng' --disable-build
configure: loading cache ../../config.cache
checking for a BSD-compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /usr/bin/mkdir -p
checking for gawk... (cached) mawk
checking whether make sets $(MAKE)... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) emcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether emcc accepts -g... (cached) yes
checking for emcc option to accept ISO C89... (cached) none needed
checking for style of include used by make... GNU
checking dependency style of emcc... (cached) gcc3
checking for ranlib... (cached) /emsdk/upstream/emscripten/emranlib
checking whether ln -s works... yes
checking what warning flags to pass to the C compiler... (cached) -Wimplicit -Wreturn-type
checking how to run the C preprocessor... (cached) emcc -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/grep -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for an ANSI C-conforming const... (cached) yes
checking for size_t... (cached) yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working strtod... yes
checking for memset... yes
checking for library containing pow... none required
configure: updating cache ../../config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating config.h
config.status: executing depfiles commands
=== configuring in obsdcompat (/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs/obsdcompat)
make: running /bin/bash '/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/libs/obsdcompat/configure'  '--disable-option-checking' '--prefix=/usr/local' '--enable-native-texlive-build' '--enable-cxx-runtime-hack' '--disable-shared' '--disable-largefile' '--without-x' '--disable-ptex' '--without-system-freetype' '--without-system-freetype2' '--without-system-gd' '--without-system-graphite' '--without-system-icu' '--without-system-kpathsea' '--without-system-libpng' '--without-system-ptexenc' '--without-system-t1lib' '--without-system-teckit' '--without-system-xpdf' '--without-system-zlib' '--disable-all-pkgs' '--enable-pdftex' '--enable-static' 'CC=emcc' 'CFLAGS=-DELIDE_CODE' 'CXX=/emsdk/upstream/emscripten/em++' '--enable-multiplatform=yes' '--enable-libtool-hack=yes' '--enable-texlive-build' '--bindir=${exec_prefix}/bin/x86_64-unknown-linux-gnu' '--libdir=${exec_prefix}/lib/x86_64-unknown-linux-gnu' '--enable-chktex=no' '--enable-dialog=no' '--enable-ps2eps=no' '--enable-psutils=no' '--enable-t1utils=no' '--enable-tpic2pdftex=no' '--enable-vlna=no' '--enable-xindy=no' '--with-clisp-runtime=default' '--disable-xpdfopen' '--enable-web2c=no' '--enable-afm2pl=no' '--enable-bibtex8=no' '--enable-bibtexu=no' '--enable-cjkutils=no' '--enable-detex=no' '--enable-devnag=no' '--enable-dtl=no' '--enable-dvi2tty=no' '--enable-dvidvi=no' '--enable-dviljk=no' '--enable-dvipdfmx=no' '--enable-dvipng=no' '--enable-dvipos=no' '--enable-dvipsk=no' '--enable-dvisvgm=no' '--enable-gsftopk=no' '--enable-lacheck=no' '--enable-lcdf-typetools=no' '--enable-makeindexk=no' '--enable-makejvf=no' '--enable-mendexk=no' '--enable-musixflx=no' '--enable-ps2pkm=no' '--enable-seetexk=no' '--enable-tex4htk=no' '--enable-ttf2pk=no' '--enable-ttfdump=no' '--enable-xdv2pdf=no' '--disable-xdvik' '--enable-xdvipdfmx=no' '--enable-tetex=no' '--enable-texlive=no' '--with-system-zziplib=no' '--mandir=${prefix}/texmf/doc/man' '--infodir=${prefix}/texmf/doc/info' '--cache-file=../../config.cache' '--srcdir=/workspaces/emsdk/texlive.js/pdftex-1.40.11/src/libs/obsdcompat' --disable-build
configure: loading cache ../../config.cache
checking for a BSD-compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... (cached) /usr/bin/mkdir -p
checking for gawk... (cached) mawk
checking whether make sets $(MAKE)... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) emcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether emcc accepts -g... (cached) yes
checking for emcc option to accept ISO C89... (cached) none needed
checking for style of include used by make... GNU
checking dependency style of emcc... (cached) gcc3
checking build system type... (cached) x86_64-unknown-linux-gnu
checking host system type... (cached) x86_64-unknown-linux-gnu
checking how to run the C preprocessor... (cached) emcc -E
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/grep -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking whether byte ordering is bigendian... no
checking for gawk... (cached) mawk
checking for ranlib... (cached) /emsdk/upstream/emscripten/emranlib
checking for egrep... (cached) /usr/bin/grep -E
checking for ar... /emsdk/upstream/emscripten/emar
checking for cat... /usr/bin/cat
checking for sed... (cached) /usr/bin/sed
checking for bash... /usr/bin/bash
checking for ksh... (cached) /usr/bin/bash
checking for sh... (cached) /usr/bin/bash
checking for sh... /usr/bin/sh
checking for inline... (cached) inline
checking whether LLONG_MAX is declared... yes
checking compiler and flags for sanity... no
=== configuring in obsdcompat failed
make[3]: Leaving directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs'
make[2]: Leaving directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/libs'
make[1]: Leaving directory '/workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex'
+ cd /workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/texk/web2c
./build-pdftex.sh: line 62: cd: /workspaces/emsdk/texlive.js/pdftex-1.40.11/build-pdftex/texk/web2c: No such file or directory

For reference

emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.23 (5ae63ce7dd955df449cb419bfe5afc51d1bd57f2)
clang version 16.0.0 (https://github.com/llvm/llvm-project 8b587113b746f31b63fd6473083df78cef30a72e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /emsdk/upstream/bin
neo-jgrec commented 10 months ago

Did you manage to compile ? I'm getting the same error.

Jamtis commented 9 months ago

I think I managed somehow but unfortunately I don't remember what I did exactly to get it to compile. I do remember that my goal was to embed a JS version of LaTeX into the web version of VSCode see James-Yu/LaTeX-Workshop#3689 but I the dev of the LaTeX extension was too pessimistic about the issue.