8000 Problem compiling on ARM hardware (rPi4 , buster) - undefined reference to `__atomic_load_8' · Issue #847 · lightspark/lightspark · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Problem compiling on ARM hardware (rPi4 , buster) - undefined reference to `__atomic_load_8' #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
26 tasks
mypinballs opened this issue Nov 21, 2021 · 3 comments

Comments

@mypinballs
Copy link
mypinballs commented Nov 21, 2021

In order to help us understand your issue, please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Please fill in the sections relevant to your issue and delete the rest.
  • Use the Preview tab to see what your issue will actually look like

What is the purpose of your issue?

  • Site Support Request: Lightspark does not work correctly on a specific website.
  • Bug: Lightspark has the same problem across multiple websites or SWF files.
  • [x ] Feature request: a request for new features or support for new platforms, not sites or SWF files.
  • Question, Comment, or Suggestion
  • If none of the above apply, check this box.

The following sections should be filled in based on the purpose listed above. Erase any section (the contents between triple ---) that does not apply.


If this issue is a bug report or site support request:

Provide the complete URL of the page with the issue here:

URL of page

If it is possible to download the file and run it with the command line, please provide a link to the file here:

URL of file

Provide the complete set of instructions required to reproduce the problem:

  1. Load the page.
  2. Insert second action here
  3. Insert third action, and so on

What kind of failure is your issue?

  • Fault: You receive a black window instead of the flash content with a white text such as We're sorry, Lightspark encountered an as yet unsupported Flash file
  • Crash: The window disappears or your browser crashes with a message such as A tab has crashed
  • Broken: Lightspark shows something, but most of the file is not usable
  • Glitch: Lightspark shows something and most of the file is usable, but things are missing or wrong compared to official Flash.
  • Performance: Lightspark runs slow or uses lots of memory trying to play the file

Provide the Lightspark version

Output of lightspark -v:

Paste output here

What operating system are you are running on?

  • Windows 7, 8 or 10
  • Windows XP, Vista or older
  • Linux: <specify distro and version here, such as Ubuntu 18.04>
  • Mac OS X: <specify version here, such as 10.8.1>
  • Other:

How are you are running Lightspark?

  • Browser plugin for Chrome or Chromium:
  • Browser plugin for Waterfox:
  • Browser plugin for other browser:
  • [x ] Lightspark executable on the command line

Which of these actions you have taken to help debug the problem?

  • I attached a screen shot of the problem to this issue
  • I have a backtrace listing and pasted it in the bottom section of this issue (hint: hitting Ctrl-C after a crash will copy it to the clipboard)
  • I have reproduced the problem using the Lightspark command line executable
  • I ran lightspark -l 4 on the command line and am attaching logs to this issue (hint: if they are too big, zip them)

If this issue is a feature request:

Identify the type of request:

  • [x ] Support for a new OS:
  • Support for a new browser:
  • Support for embedding in an application:

If this issue is a question, comment, or suggestion:

Identify the subject of this issue:

  • The documentation of how to use Lightspark, including the wiki
  • [ x] The build instructions to compile Lightspark from source
  • The project and how it is managed (people, process, and so on)
  • Other subject matter not listed

Description of your issue

I am using Lightspark on ARM hardware, specifically rPi4 (buster). I ran into some problems compiling from the source (0.8.5). It was complaining about

undefined reference to '__atomic_load_8'

which after some googling seemed to be a problem linking or including the atomic library. It seems to get mentioned regarding building other projects on arm hardware to.

I solved it by a lot of experimenting and searching about. What worked here was

edit CMakeCache.txt
change this line to: RTMP_LIBRARIES:INTERNAL=rtmp;z;gmp;atomic
change this line to: RTMP_LIBS_PATHS:INTERNAL=/usr/lib/arm-linux-gnueabihf/libatomic.so.1

I'm not 100% sure if both lines are needed. I hope this helps other ARM users get it installed :) and hopefully the build can be updated to support this automatically.

@dbluelle
Copy link
Collaborator

It seems that cmake has no builtin check if -latomic is needed, so we might need to add a cmake module for this.
(There are modules from llvm (see https://github.com/llvm-mirror/llvm/blob/master/cmake/modules/CheckAtomic.cmake ) and google (see https://chromium.googlesource.com/chromium/llvm-project/libcxx/+/refs/heads/master/cmake/Modules/CheckLibcxxAtomic.cmake ) but they seem to be only for llvm, not for gcc.
However for now a better workaround than editing CmakeCache.txt may be calling cmake with parameter -DCMAKE_EXE_LINKER_FLAGS="-latomic".

@mypinballs
Copy link
Author

Whilst searching for solutions on google for this I tried the -DCMAKE_EXE_LINKER_FLAGS="-latomic" option but it did not work, only what I mentioned above did.

I also tried the following during the experimentation (none of them worked)

export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libatomic.so.1.2.0

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-latomic" ..
cmake -DCMAKE_BUILD_TYPE=Release -DOTHER_LIBS:FILEPATH=/usr/lib/arm-linux-gnueabihf/libatomic.so.1 ..

@dbluelle
Copy link
Collaborator

As lightspark compiles a library and an executable, I think you also need to set the -DCMAKE_SHARED_LINKER_FLAGS="-latomic" option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0