BPG Emscripten compilation failure

I am currently working on compiling the BPG decoder to create a Javascript version using Emscripten. Despite my efforts, I encountered an error that is preventing successful compilation:

emcc -Os -Wall -MMD -fno-asynchronous-unwind-tables -fdata-sections -ffunction-sections -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -I. -DCONFIG_BPG_VERSION=\"0.9.5\" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -std=c99 -D_GNU_SOURCE=1 -DUSE_VAR_BIT_DEPTH -c -o libavutil/buffer.js.o libavutil/buffer.c
In file included from libavutil/buffer.c:22:
In file included from libavutil/atomic.h:29:
libavutil/atomic_gcc.h:54:12: error: cannot compile this atomic library call yet
    return __atomic_add_fetch(ptr, inc, __ATOMIC_SEQ_CST);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
Makefile:202: recipe for target 'libavutil/buffer.js.o' failed
make: *** [libavutil/buffer.js.o] Error 1

Does anyone have any suggestions on how to resolve this issue?

Answer №1

The problem arose from the Emscripten compiler included in Ubuntu 14.10; after upgrading, everything is functioning correctly:

$ ./emcc -v
emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) 1.29.0
clang version 3.4

It's worth mentioning that I also had to obtain a newer version of libpng.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best method to retrieve an 'Array' within an Array utilizing Angular framework?

I have a custom array structure within my component that includes a name paired with another array indicating the number of times the name has been selected. I am facing difficulty in extracting the length of the second nested array or using something lik ...

Merge the inverse property and inverse class selector with the current selector for enhanced specificity

I was looking at this jQuery code snippet: $("#Filter ul input:checked").each(function () { if (!$(this).prop("disabled") && !$(this).hasClass("ignoreInput")) { Is there a way to simplify this into just one selector? It seems like I'm ha ...

The scrollTop functionality is not functioning as expected in AngularJS when using the $timeout directive

In my angularJS project, I'm working on implementing a small chat feature. To ensure that the messages are always visible to users, I need the message display div to automatically scroll down when the page loads. For this purpose, I have created a cus ...

Enhancing VueJS2 components by optimizing code structure to eliminate duplicate elements

The following code is used in two different components, so please avoid using props. Utilize data variables and largely similar methods but with different component templates. <template> </template> <script> export default { name ...

Unique events catered to specific devices: mobile vs. desktop

When a user clicks on the login icon from a desktop, I want a modal dialog to appear. However, when using smaller devices like mobile or tablets, I prefer that a reactjs route is triggered to display in the main content area instead of using a modal dialog ...

executing dual success handlers during Ajax requests

I am currently in the process of developing a web application that involves numerous ajax requests spread out across various templates. My approach includes using ajaxSetup on the main template, which serves as the base for all other templates. Within thi ...

Configuring lazy loaded modules with Angular 2 router

I am in the process of developing a service that utilizes router configuration to generate a map of routes based on components. Everything works smoothly except when dealing with lazy loaded module routes. I'm stuck on how to retrieve routes from a l ...

Strategies for breaking down and streamlining Drag-And-Drop code into more manageable sections

Upon experimenting with react-beautiful-dnd, I developed a prototype drag & drop functional component. However, I find the code quite lengthy (around 250 lines) and believe it could be structured better. You can view this example on this sandbox. I am see ...

What is the best way to sort and tally items within a JavaScript array?

I am currently working on implementing the filter method on an array that contains objects like the following: { "start": 1234, "end": 4321, "count": 0 } My goal is to remove duplicates from the array while incrementing the count property. So far, ...

Having trouble updating the ASP Dropdown that has list items added through a jQuery AJAX call? Keep receiving the error message "Invalid postback or callback"?

I encountered a simple problem that I ended up complicating. In my web application, I have an ASP Dropdown that I want to populate with values from the database. To achieve this, I used jquery and Ajax to dynamically add list items to the dropdown successf ...

Is there a way to render the vuex module in nuxt prior to rendering the middleware?

I am facing an issue where the middleware renders before Vuex when the page is reloaded. This causes a problem as I need to change a value in Vuex based on the user's authentication status. Due to this sequence, the middleware returns the initial valu ...

Capturing a click event on a mobile device in the Froala editor: A step-by

I've implemented the "'froalaEditor.click': function (e, editor, clickEvent)" to detect click events on Froala editor, and it functions perfectly on desktops and laptops. However, it doesn't seem to work on mobile devices. Are there any ...

Unlocking the Power of HTML5 with Karma Launchers

No official documentation confirms or denies whether the karma launchers support HTML5 in browsers. Despite this, my tests are failing due to missing HTML5 capabilities in Firefox, Chrome, and PhantomJS. Interestingly, everything runs smoothly when using t ...

Issue with Laravel: Fetch API does not allow updating multiple records simultaneously

Having an issue updating multiple records at once. Only the first record is getting updated while the rest are not. Using the fetch API for AJAX calls and sending array data successfully, as confirmed in the browser's dev tools. When attempting to s ...

Exploring the quirky characters in the PHP mail() function

Currently using the php mail function, it's somewhat effective, although not my preferred method. However, it seems I must make do for now. The issue at hand is that special European characters are showing up strangely in the email. I attempted to se ...

"Organizing Material-UI imports results in a more cohesive styling structure

While delving into MUI, I encountered a frustrating CSS debugging challenge. Whenever I exported a component into its own module, my styling would go haywire. After much trial and error, I discovered that the issue lay in my imports... Initially, my impor ...

Ways to retrieve the returned value from the JS FETCH API outside of its scope

As a beginner in Typescript React and the Ionic framework, I am trying to use the JS FETCH API to fetch data from a third-party source. However, I am struggling to access this fetched data outside of the fetch function. If anyone could provide some guidan ...

Issues with jQuery tabs

I am looking to incorporate multiple tab constructions on my website. I have created an HTML page and a JavaScript page for these tabs. Here is the code I have implemented in the header: <script type="text/javascript"> $(document).ready(fu ...

Preventing pageup/pagedown in Vuetify slider: Tips and tricks

I am currently using Vuetify 2.6 and have integrated a v-slider into my project. Whenever the user interacts with this slider, it gains focus. However, I have assigned PageUp and PageDown keys to other functions on the page and would like them to continue ...

Sending JavaScript objects from React.js to Node.js

I send the object to the backend (Node js) when making an API call, but I am logging the objects for verification. Initially, I used POSTMAN to check and it worked perfectly. However, when attempting to pass an object in the frontend (Reactjs), it appear ...