t-tk / upmendex-package

Source/Document distribution of upmendex --- multilingual index processor
Other
5 stars 1 forks source link

Autoconf compiler check breaks Emscripten build #1

Closed vadimkantorov closed 3 years ago

vadimkantorov commented 4 years ago

It cannot discover any compiler output (suffixed as .out.js if no -o option is given) and thus halts ./configure: https://github.com/TeX-Live/texlive-source/blob/trunk/texk/upmendex/configure#L3081 with the message that "compiler cannot create executables"

Other similar compiler checks in other TexLive programs pass without problems. Maybe just need to re-run with a recent autoconf? Unfortunately this check is not cached.

Would you have some ideas how to stub it out by config.site or config.cache?

If needed, I'll prepare a repro (I can repro by building the full TexLive tree for now, will figure out how to make only upmendex)

t-tk commented 4 years ago

Thank you for your comment. In current TeX Live svn repository https://www.tug.org/svn/texlive/trunk/Build/source/texk/upmendex/ , configure is generated by the latest autotools (automake 1.16.2 (2020-03-21) & autoconf 2.69 (2012-04-24)). Karl has kindly updated them at r56843

According to google, an error with the message "compiler cannot create executables" is fixed by installing related compiler software in many cases. https://www.google.com/search?channel=fs&client=ubuntu&q=%22compiler+cannot+create+executables%22 It might be useful information.

vadimkantorov commented 4 years ago

Thanks for your response!

The strange thing is that in all other texlive tools, the compiler check passes successfully. Only upmendex one fails with emcc.

vadimkantorov commented 4 years ago

@t-tk Where should I report this issue? Should I send it to tlbuild mailing list? upmendex clearly uses different compiler check compared to the rest of TexLive

Emscripten compiler of course "can create executables", and I'm able to compile the rest of TexLive without problems. I have compiler well-installed and no additional software is needed, since I'm able to compile other parts of TexLive without issues

vadimkantorov commented 4 years ago

I'll post a full repro in a few days, but maybe even doing autoreconf with fresh autoconf would do the trick...

t-tk commented 4 years ago

I do not know why configure script of upmendex requested emcc or emscripten in your system. In my environment (ubuntu linux), I do not need emcc. In addition, I could not find the word emcc in Travis CI build logs.

upmendex itself is written in C (not C++) language and linked with the ICU library written in C++. The composition might be unique compared to other TeX Live tools. I have no more idea about what make difference.

vadimkantorov commented 4 years ago

I'll post a full repro, hope it would be helpful.

Emscripten/emcc is a cross-compile of C to WebAssembly. TexLive doesn't target WebAssembly in regular builds, as far as I understand. So emcc cannot be found in Tracis CI build logs.

upmendex requested emcc because I specified emcc as a cross-compiler. You may not need emcc, but users who are trying to cross-compile TexLive to WebAssembly do need to use emcc for the time being.

vadimkantorov commented 3 years ago

I just checked with TexLive-2021, the error still persists. I can share compilation logs with you if needed. Only upmendex of whole TexLive distribution fails with this error.

Somehow, the autoconf/automake checks used seems different from other TexLive tools.

t-tk commented 3 years ago

I tried to fix the issue: https://github.com/t-tk/upmendex-package/commit/c073b9780f1719fdcd6abab7ba0baaf23a88fbdd . A small change of configure.ac caused the difference of configure in procedure for checking C/C++ compiler.

In my environment, both (conventional and new) configure are OK and it makes no difference. I hope the patch will fix your issue.

vadimkantorov commented 3 years ago

Thanks for looking into this! I'll try to try it out and will let you know! Should checkout from repo into texk/upmendex be enough for updating TexLive source tree and try out new upmendex there?

t-tk commented 3 years ago

I have not committed the patch to TeX Live svn repository yet. If you have already had the compile environment, you can try it by downloading configure from https://github.com/t-tk/upmendex-package/tree/autoconf-fix and using it instead of the conventional configure. I think that replacing only one fileconfigure is enough to test. No need to fully checkout the repository.

vadimkantorov commented 3 years ago

got it, cool!

vadimkantorov commented 3 years ago

Seems to work!

vadimkantorov commented 3 years ago

So I think this patch is good!

t-tk commented 3 years ago

committed to TeX Live svn r59630.

vadimkantorov commented 3 years ago

My name is mentioned incorrectly in the changelog, it's Vadim, not Vadmin. But other than that this can be closed :)

t-tk commented 3 years ago

I'm sorry. I corrected the misspelling. Thank you for your contribution.