OffscreenCanvas
After not finding 'OffscreenCanvas' amongst the Cheerp 3.0 c++ include files, I had posted an 'issue' about it on github, to be told that I should check here (though in searching here, I only see two nebulous mentions which don't indicate availability), and that it could be obtained by downloading the latest sources & recompiling (however, in performing a ~naïve github search of the sources therein, I have not yet found 'OffscreenCanvas' defined there either!?). The other suggestion was 'nightly builds', but I would think that those should/would be being built from the available source (?).
19 Replies
Hi, welcome. The headers are available here: https://github.com/leaningtech/cheerp-utils
GitHub
GitHub - leaningtech/cheerp-utils: Cheerp headers and utils
Cheerp headers and utils. Contribute to leaningtech/cheerp-utils development by creating an account on GitHub.
The nightly PPA is here: https://launchpad.net/~leaningtech-dev/+archive/ubuntu/cheerp-nightly-ppa
Cheerp is composed of multiple repos. You have most likely only searched in the main compiler repo, which does not include the client headers.
No, I thought I had searched there!?:

FWIW, I'm also not finding "ResizeObserver"
GitHub search does not work.
https://github.com/leaningtech/cheerp-utils/blob/master/include/client/new/clientlib.h#L19385
GitHub
cheerp-utils/include/client/new/clientlib.h at master · leaningtec...
Cheerp headers and utils. Contribute to leaningtech/cheerp-utils development by creating an account on GitHub.
I was finally able to find pthread support in your source code files via https://github.com/search?type=Code (but for some reason it claims that it's not finding it in any 'repositories'!?, though the source files are shown as being in them!?!? and it isn't finding the two above : ResizeObserver & OffscreenCanvas).
GitHub
Build software better, together
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

GitHub search is notoriously broken , but the features are all there as I said previously
FWIW "Forcing GitHub to reindex your repos": https://gist.github.com/george-hawkins/035a3cca67698316c12d3071684d9928
Gist
Forcing GitHub to reindex your repos
Forcing GitHub to reindex your repos. GitHub Gist: instantly share code, notes, and snippets.
In following your recommendation to build the latest source, although apparently mostly succeeding, I encountered some errors in building the 'utilities and libraries', particularly errors in a file called common.cpp, and building something called "libsystem.bc"!? <encl>.
it also doesn't appear to have installed the latest client.h/clientlib.h
The 'unit tests' [python3 run_tests.py ...] all appear to error out
Make sure to use instructions for latest rather than stable.
Leaning Technologies Developer Hub
How to build Cheerp on Linux - Cheerp Documentation
Cheerp is an enterprise-grade compiler toolchain that can compile C/C++ into efficient WebAssembly and JavaScript. It is open source, liberally licensed, and actively developed by Leaning Technologies.
Also consider using the prebuilt Ubuntu PPA instead if you have a compatible distro
Ya, I think you should see from the partial error log that I submitted that I'm compiling on a Mac (no ppa : I think you might want to add brew or macports support).
In rebuilding, some of the errors went away (and 'new' client.h/clientlib.h found), and new errors appeared (looks like mostly in libcxxabi : can't find standard c things like size_t : I'm wondering if maybe it expects include paths to be set up?), and still has the "/Applications/cheerp/bin/llvm-link: error: linked module is broken!" error too...
Compiling the libs on Mac is not supported, the instructions are for Linux
You can use docker and the PPA
Ahhh... llvm and clang are considered 'Apple' technologies, man...
In looking at things for a bit, sources indicate that your CMake files may likely be misconfigured...
(I guess maybe they're saying here that conflicting libcxx and libcxxabi include paths will cause such conflicts?):
https://bugs.llvm.org/show_bug.cgi?id=40987
I have linux up on VPS, but not with gigs of space available at the moment
I just re-built Cheerp, following this on Fedora Linux and it worked fine, therefore I'd exclude some issue related to any CMake files, also I'd highlight the fact that some of those commands have to be run with admin privileges, as the aforementioned guide also specifies.
About the anomaly where usual C types are not found, it's unlikely, but could it be there's something wrong with the dev tools on your machine?
With that said, I'd strongly recommend to stick with a Linux environment to complete successfully the installation.
To get my own code to compile again, I've reverted to your last official / Mac release, v3.0 (though your build process reportedly replaced a few unrevertible things on my system outside of your compiler directory). Things such as OffscreenCanvas have been implemented in many browsers for a few years (and for longer than the v3.0 release date). I feel somewhat surprised that you haven't come out with a released version that supports such, or some other way to bring your client includes up to date, by now.