You are not logged in.

#1 2010-05-18 14:37:35

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Lightspark PKGBUILD: problems on building

I was creating a new PKGBUILD for lightsmark-git, an alternative opensource flash plugin:

# Contributor: Flamelab <panosfilip@gmail.com>

pkgname=lightspark-git
_realpkgname=lightspark
pkgver=20100518
pkgrel=1
pkgdesc="An alternative Flash Player implementation "
arch=("i686" "x86_64")
url="http://sourceforge.net/projects/lightspark/"
depends=('glew' 'sdl' 'nasm' 'ftgl')
makedepends=('cmake' 'llvm')
license=('GPL')
source=("001-llvm-cmake-error-fix.patch")
options=(!libtool)

_gitroot="git://lightspark.git.sourceforge.net/gitroot/lightspark/lightspark"
_gitname="lightspark"

build() 

{ 
    cd ${srcdir}/

    msg "Connecting to the GIT server...."
    if [[ -d ${srcdir}/${_gitname} ]] ; then
        cd ${_gitname}
        git pull origin
        msg "The local files are updated..."
    else
        git clone ${_gitroot}
    fi
    
    msg "GIT checkout done."

    msg "Starting make for: ${pkgname}"
    
    if [[ -d ${srcdir}/${_gitname}-build ]]; then
       msg "Cleaning the previous build directory..." 
       rm -rf ${srcdir}/${_gitname}-build
    fi

    git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
    
    cd ${srcdir}/${_gitname}-build
        
    msg "Starting configure..."

   patch -Np1 -i ${srcdir}/001-llvm-cmake-error-fix.patch

   cmake . -DCMAKE_BUILD_TYPE=Release -DCOMPILE_PLUGIN=ON -DCMAKE_INSTALL_PREFIX=/usr       #-DUSE_VAAPI=on
    
    msg "Starting make..."
    make || return 1
}

package()

{

    cd ${srcdir}/${_gitname}-build
    make DESTDIR=${pkgdir} install || return 1
   
}
md5sums=('c2eae90af9061072f304289af2fdc143')

I'm building it on x86_64.

I encounter this problem:

Linking CXX static library libspark.a                                                                                          
[ 94%] Built target spark                                                                                                      
Scanning dependencies of target lightspark
[ 97%] Building CXX object CMakeFiles/lightspark.dir/main.cpp.o                                                                
Linking CXX executable lightspark                                                                                              
/usr/bin/ld: cannot find -lLLVMLinker                                                                                          
collect2: ld returned 1 exit status
make[2]: *** [lightspark] Error 1
make[1]: *** [CMakeFiles/lightspark.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.

How can I fix that LLVMLinker error ? Please ? big_smile

Thanks in advance.

Last edited by flamelab (2010-05-18 17:22:41)

Offline

#2 2010-05-18 16:57:59

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

Lightspark depends also on nasm and ftgl.

Currently trying to build, having the same issue...

Offline

#3 2010-05-18 17:09:28

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Lightspark PKGBUILD: problems on building

Ι added these deps in my local PKGBUILD, thank you..!

No luch with building though ?

My knowledge upon llvm is near to complete zero.

Offline

#4 2010-05-18 17:13:54

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

Apply this before calling "cmake .":

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46ca86b..e8a46ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,8 @@ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${EXTRA_LIBS_INCLUDE_DIRS})

+SET(CMAKE_EXE_LINKER_FLAGS ${LLVM_LDFLAGS})
+
 FIND_LIBRARY(lib_pthread pthread REQUIRED)
 FIND_LIBRARY(lib_glew GLEW REQUIRED)

Offline

#5 2010-05-18 17:22:02

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Lightspark PKGBUILD: problems on building

:-/

yet again the same prob with the patch

[ 86%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/__/netutils.cpp.o
[ 88%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/__/timer.cpp.o                                           
[ 89%] Scanning dependencies of target tightspark                                                                              
Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/__/decoder.cpp.o                                                
[ 90%] Building CXX object CMakeFiles/tightspark.dir/tightspark.cpp.o                                                          
[ 92%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/__/threading.cpp.o                                       
Linking CXX executable tightspark                                                                                              
[ 93%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/__/flashxml.cpp.o                                        
[ 93%] Built target tightspark                                                                                                 
[ 94%] Building ASM-NASM object plugin-dir/CMakeFiles/lightsparkplugin.dir/__/fastpaths_64.asm.o
[ 96%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/np_entry.cpp.o                                           
[ 97%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/npn_gate.cpp.o                                           
[ 98%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/npp_gate.cpp.o                                           
[100%] Building CXX object plugin-dir/CMakeFiles/lightsparkplugin.dir/plugin.cpp.o                                             
/home/flamelab/Projects/lightspark-git/src/lightspark-build/decoder.cpp: In member function 'virtual bool lightspark::FFMpegDecoder::decodeData(uint8_t*, uint32_t)':
/home/flamelab/Projects/lightspark-git/src/lightspark-build/decoder.cpp:365:2: warning: 'int avcodec_decode_video(AVCodecContext*, AVFrame*, int*, const uint8_t*, int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3448)
/home/flamelab/Projects/lightspark-git/src/lightspark-build/decoder.cpp:365:69: warning: 'int avcodec_decode_video(AVCodecContext*, AVFrame*, int*, const uint8_t*, int)' is deprecated (declared at /usr/include/libavcodec/avcodec.h:3448)
/home/flamelab/Projects/lightspark-git/src/lightspark-build/flashxml.cpp: In static member function 'static lightspark::ASObject* lightspark::XMLDocument::_constructor(lightspark::ASObject*, lightspark::ASObject* const*, unsigned int)':
/home/flamelab/Projects/lightspark-git/src/lightspark-build/flashxml.cpp:46:15: warning: unused variable 'th'
Linking CXX shared library liblightsparkplugin.so
/usr/bin/ld: cannot find -lLLVMLinker                                                                                          
collect2: ld returned 1 exit status
make[2]: *** [plugin-dir/liblightsparkplugin.so] Error 1
make[1]: *** [plugin-dir/CMakeFiles/lightsparkplugin.dir/all] Error 2
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...

------

I updated the PKGBUILD in the first post !

Last edited by flamelab (2010-05-18 17:23:02)

Offline

#6 2010-05-18 17:28:00

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

About this part:

git clone ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build
cd ${srcdir}/${_gitname}-build
msg "Starting configure..."
cmake . -DCMAKE_BUILD_TYPE=Release #-DUSE_VAAPI=on

CMake supports out-of-source builds, so the way to go is:

mkdir ${srcdir}/${_gitname}-build
cd ${srcdir}/${_gitname}-build
msg "Starting configure..."
cmake ../${_gitname} -DCMAKE_BUILD_TYPE=Release

If you want to build a mozilla plugin, add -DCOMPILE_PLUGIN=TRUE option for cmake. This adds dependency to gtk2 and gtkglext.

Also, it depends always on libavcodec, libavutil and pcre.

Offline

#7 2010-05-18 17:33:10

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Lightspark PKGBUILD: problems on building

I updated the deps/makedeps

depends=('glew' 'sdl' 'nasm' 'ftgl' 'gtk2' 'gtkglext' 'ffmpeg' 'pcre')
makedepends=('cmake' 'llvm')

I guess it's OK ?

I also posted on the maintainer's blog so that i could ask him about that problem.

Offline

#8 2010-05-18 17:33:35

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46ca86b..b82b0a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,9 @@ INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${EXTRA_LIBS_INCLUDE_DIRS})

+SET(CMAKE_EXE_LINKER_FLAGS ${LLVM_LDFLAGS})
+SET(CMAKE_SHARED_LINKER_FLAGS ${LLVM_LDFLAGS})
+
 FIND_LIBRARY(lib_pthread pthread REQUIRED)
 FIND_LIBRARY(lib_glew GLEW REQUIRED)

A little bit corrected patch to add the same linker flags for building shared libraries as well. smile
Should build correctly now.

Last edited by Mad Fish (2010-05-18 17:34:14)

Offline

#9 2010-05-18 17:37:08

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Lightspark PKGBUILD: problems on building

Ιt's been built !! thank you !

let's see if it works...

Offline

#10 2010-05-18 17:42:05

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

flamelab wrote:
depends=('glew' 'sdl' 'nasm' 'ftgl' 'gtk2' 'gtkglext' 'ffmpeg' 'pcre')
makedepends=('cmake' 'llvm')

I think nasm is 'makedepends'.
Also, don't do a needless "git clone", please. You should do a out-of-source build in this case, as I've mentioned earlier (or build in-source).

Good luck! Waiting for completed PKGBUILD to appear in AUR.

Offline

#11 2010-05-18 17:42:48

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Lightspark PKGBUILD: problems on building

Offline

#12 2010-05-18 17:48:42

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

flamelab wrote:

Wow. That's why I love Arch community. Active and fast. smile

It seems that it is building from non-official repo (maybe to include a fix for build system).

Offline

#13 2010-05-18 17:51:58

flamelab
Member
From: Athens, Hellas (Greece)
Registered: 2007-12-26
Posts: 2,160

Re: Lightspark PKGBUILD: problems on building

Ι used Steffens PKGBUILD, it handles the llvm issue in a somewhat gentle way.

It can be built, but it crashes instantly :-/

Offline

#14 2010-05-18 17:59:22

Mad Fish
Member
Registered: 2009-09-22
Posts: 295

Re: Lightspark PKGBUILD: problems on building

  LDFLAGS+=" -L /usr/lib/llvm"

Yeah, I see. But that is workaround, really.

Offline

#15 2010-05-18 19:33:22

Leffe
Member
Registered: 2006-05-30
Posts: 47

Re: Lightspark PKGBUILD: problems on building

It crashes right here:

FTTextureFont font("/usr/share/fonts/truetype/ttf-liberation/LiberationSerif-Regular.ttf");
    if(font.Error())
        throw RunTimeException("Unable to load font",sys->getOrigin().raw_buf());

Adding a symbolic link from /usr/share/fonts/truetype/ttf-liberation to /usr/share/fonts/TTF makes the application run for me.

Offline

#16 2010-05-19 18:53:25

ehlo
Member
From: England
Registered: 2010-04-04
Posts: 66

Re: Lightspark PKGBUILD: problems on building

Now that you have it running, I'd be interested to know what its compatibility is like so far given that it is still a fairly early release. I'm particularly interested in youtube, CBS.com full episode videos and iPlayer! smile

Offline

#17 2010-05-19 19:06:33

extofme
Member
From: here + now
Registered: 2009-10-10
Posts: 174
Website

Re: Lightspark PKGBUILD: problems on building

i couldn't get youtube or hulu to work in FF or chromium.  hulu's front page flashed up for a second so i think its working... not really sure though; how are you guys testing/seeing where it crashes?

FF crashed everytime the flash player started to init...


what am i but an extension of you?

Offline

#18 2010-05-19 20:33:50

Leffe
Member
Registered: 2006-05-30
Posts: 47

Re: Lightspark PKGBUILD: problems on building

ehlo wrote:

Now that you have it running, I'd be interested to know what its compatibility is like so far given that it is still a fairly early release. I'm particularly interested in youtube, CBS.com full episode videos and iPlayer! smile

The only thing I can say for sure is that it has no audio support yet.

Offline

#19 2010-07-21 19:46:20

ehlo
Member
From: England
Registered: 2010-04-04
Posts: 66

Re: Lightspark PKGBUILD: problems on building

http://allievi.sssup.it/techblog/?p=496

A new version is out. Has anyone tried this?

Offline

#20 2010-09-12 17:50:07

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: Lightspark PKGBUILD: problems on building

does this work for anyone? can someone who has experience write a brief how to?


Acer Aspire V5-573P Antergos KDE

Offline

#21 2010-09-12 18:26:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Lightspark PKGBUILD: problems on building

venky80 wrote:

does this work for anyone? can someone who has experience write a brief how to?

You mean lightspark? https://bbs.archlinux.org/viewtopic.php … 62#p825062

Offline

Board footer

Powered by FluxBB