PDA

View Full Version : All sorts of problems with swftools


RupertKent
5th November 2009, 02:58 PM
Hi all,

I'm new to the forum and also new to Linux so I hope I'm posting in the right place here.

I have recently made my first Linux install using Fedora 11 and Alfresco with a view to running a PoC ECM server.

After some initial teething troubles and a seemingly exponential learning curve, Fedora and ALfresco are now installed and running bar a couple of things.

Alfresco relies on swftools to automatically transform file types and swftools does not come installed either with Fedora, as an available package to download within the Add/Remove software program or with Alfresco.

I have installed the dependencies of swftools (zlib-devel, libjpeg-devel, giflib-devel, freetype-devel, gcc, gcc-c++ and make) but for some reason neither swftools-0.8.1 nor swftools-0.9.0 will compile properly. I even installed lame in case but still problems. This is what I do to install:

tar -zvxf swftools-0.9.0.tar.gz *stuff happens*
cd swftools-0.9.0
./configure --disable-lame (lame disabled as advised by Alfresco Wiki) *stuff happens*
make *stuff happens with errors*

The errors include :

warning: initialization from incompatible pointer type
invalid conversion from 'const char*' to 'char*'
Error 2

etc...

Can anyone shed any light on what might be wrong...?

Thanks in advance,

Rup

PatMcLJr
5th November 2009, 03:29 PM
That Alfresco looks interesting.

Nothing to do with the swftools problem but maybe you would have better luck running this on Centos? I'll bet there is different version of gcc, gcc-c++ in Centos that might play nicer with the compiling?

Just a thought,
Good Luck, and Thank You for pointing up Alfresco,
Pat Jr.

PabloTwo
5th November 2009, 04:04 PM
Just for funzies, I downloaded the source code tarball, installed the giflib-devel package (the only dep I was missing) and had a go with this on my F8 system. My compilers are from the F9 repos.
BASH:~/-> rpm -q gcc gcc-c++ zlib-devel libjpeg-devel giflib-devel freetype-devel
gcc-4.3.0-8.i386
gcc-c++-4.3.0-8.i386
zlib-devel-1.2.3-14.fc8.i386
libjpeg-devel-6b-39.fc8.i386
giflib-devel-4.1.3-8.i386
freetype-devel-2.3.5-5.fc8.i386
The ./configure --disable-lame went without a hitch.

make threw off a gazillion *warnings* but no *error* that caused it to halt.

BASH:~/src/swftools-0.9.0/-> sudo make install | tee > /var/tmp/swftools_install happened in a blink.

BASH:~/src/swftools-0.9.0/-> cat /var/tmp/swftools_install | grep installing
installing wav2swf to /usr/local/bin
installing png2swf to /usr/local/bin
installing swfcombine to /usr/local/bin
installing swfstrings to /usr/local/bin
installing swfextract to /usr/local/bin
installing swfdump to /usr/local/bin
installing swfc to /usr/local/bin
installing jpeg2swf to /usr/local/bin
installing gif2swf to /usr/local/bin
installing swfbbox to /usr/local/bin
installing font2swf to /usr/local/bin
installing swfrender to /usr/local/bin
installing as3compile to /usr/local/bin
installing pdf2swf to /usr/local/bin

I doubt this does anything to help you, but you might also look into installing some or all of these packages, then try again.

compat-libstdc++-296
compat-gcc-34
compat-libgcc-296
compat-gcc-34-c++
compat-libf2c-34
compat-libstdc++-33

Edit: Also installed are:

BASH:~/-> ls /usr/local/share/swftools/swfs/
default_loader.swf keyboard_viewer.swf simple_viewer.swf tessel_loader.swf
default_viewer.swf PreLoaderTemplate.swf swft_loader.swf

BASH:~/-> ls /usr/local/share/man/man1/
png2swf.1 swfcombine.1 swfrender.1 font2swf.1
jpeg2swf.1 swfbbox.1 swfdump.1 swfstrings.1
gif2swf.1 pdf2swf.1 swfc.1 swfextract.1 wav2swf.1

PabloTwo
5th November 2009, 08:34 PM
Gosh, I was having so much fun with swftools-0.9.0 I just couldn't stop. I built an rpm package for Fedora from it. swftools-0.9.0-1.fc8.i686.rpm

If you're using 32 bit and can't get it compiled yourself, holler. I can upload it to a download site and you can grab it there. I didn't disable lame in this package.
BASH:~/-> rpm -qpl swftools-0.9.0-1.fc8.i686.rpm
/usr/bin/as3compile
/usr/bin/font2swf
/usr/bin/gif2swf
/usr/bin/jpeg2swf
/usr/bin/pdf2swf
/usr/bin/png2swf
/usr/bin/swfbbox
/usr/bin/swfc
/usr/bin/swfcombine
/usr/bin/swfdump
/usr/bin/swfextract
/usr/bin/swfrender
/usr/bin/swfstrings
/usr/bin/wav2swf
/usr/share/doc/swftools-0.9.0
/usr/share/doc/swftools-0.9.0/AUTHORS
/usr/share/doc/swftools-0.9.0/COPYING
/usr/share/doc/swftools-0.9.0/ChangeLog
/usr/share/doc/swftools-0.9.0/FAQ
/usr/share/man/man1/as3compile.1.gz
/usr/share/man/man1/font2swf.1.gz
/usr/share/man/man1/gif2swf.1.gz
/usr/share/man/man1/jpeg2swf.1.gz
/usr/share/man/man1/pdf2swf.1.gz
/usr/share/man/man1/png2swf.1.gz
/usr/share/man/man1/swfbbox.1.gz
/usr/share/man/man1/swfbytes.1.gz
/usr/share/man/man1/swfc.1.gz
/usr/share/man/man1/swfcombine.1.gz
/usr/share/man/man1/swfdump.1.gz
/usr/share/man/man1/swfextract.1.gz
/usr/share/man/man1/swfrender.1.gz
/usr/share/man/man1/swfstrings.1.gz
/usr/share/man/man1/wav2swf.1.gz
/usr/share/swftools/swfs/PreLoaderTemplate.swf
/usr/share/swftools/swfs/default_loader.swf
/usr/share/swftools/swfs/default_viewer.swf
/usr/share/swftools/swfs/keyboard_viewer.swf
/usr/share/swftools/swfs/simple_viewer.swf
/usr/share/swftools/swfs/swft_loader.swf
/usr/share/swftools/swfs/tessel_loader.swf
BASH:~/-> rpm -qp --requires swftools-0.9.0-1.fc8.i686.rpm
lame
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.4)
libc.so.6(GLIBC_2.7)
libfontconfig.so.1
libfreetype.so.6
libgcc_s.so.1
libgcc_s.so.1(GCC_3.0)
libgcc_s.so.1(GLIBC_2.0)
libgif.so.4
libjpeg.so.62
libm.so.6
libm.so.6(GLIBC_2.0)
libm.so.6(GLIBC_2.1)
libmp3lame.so.0
libstdc++.so.6
libstdc++.so.6(CXXABI_1.3)
libstdc++.so.6(GLIBCXX_3.4)
libungif.so.4
libz.so.1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)

jpollard
5th November 2009, 09:00 PM
Hi all,

I'm new to the forum and also new to Linux so I hope I'm posting in the right place here.

I have recently made my first Linux install using Fedora 11 and Alfresco with a view to running a PoC ECM server.

After some initial teething troubles and a seemingly exponential learning curve, Fedora and ALfresco are now installed and running bar a couple of things.

Alfresco relies on swftools to automatically transform file types and swftools does not come installed either with Fedora, as an available package to download within the Add/Remove software program or with Alfresco.

I have installed the dependencies of swftools (zlib-devel, libjpeg-devel, giflib-devel, freetype-devel, gcc, gcc-c++ and make) but for some reason neither swftools-0.8.1 nor swftools-0.9.0 will compile properly. I even installed lame in case but still problems. This is what I do to install:

tar -zvxf swftools-0.9.0.tar.gz *stuff happens*
cd swftools-0.9.0
./configure --disable-lame (lame disabled as advised by Alfresco Wiki) *stuff happens*
make *stuff happens with errors*

The errors include :

warning: initialization from incompatible pointer type
invalid conversion from 'const char*' to 'char*'
Error 2

etc...

Can anyone shed any light on what might be wrong...?

Thanks in advance,

Rup

Yup - that is a coding error - now, originally that was just a casting error,
but it depends on what and how the "char *" is being used. According to
the declaration, it should be a constant.

SOMETIMES that can be fixed by directing that it really will be modified
(normally for the purpose of scanning a string) in which case the assignment/initialization can be changed from

char *whatever = paramptr;

to

char *whatever = (char *)paramptr;

without a problem. If, however, the data being pointed to IS modified then
you have a bug because the specification for paramptr is "const char *paramptr" meaning that it (the data) should not be modified... and in
fact the data may be a true constant (like paramptr = "this is a string").
You modify that string and the constant value gets changed... if you are
allowed to write to the string at all.

RupertKent
6th November 2009, 09:06 AM
Thanks very much for the support, I am really grateful. I have tried again after installing the additional packages mentioned.

Firstly, it seems that makefile and makefile.common exist within the tarball. After running make, I saw from ther time-stamp that the two files had been replaced with new versions so I went ahead and ran make install.

Seemed OK but then crapped out with the following:

/usr/bin/install: cannot stat './simple_viewer.swf': no such file or directory
make [1]: *** [install] Error 1
make [1] Leaving directory '/home/Server/swftools-0.9.0/swfs'
make: *** [install] Error 2

PabloTwo: Your rpm would be greatly appreciated if you have the chance to make it available for me.

PabloTwo
6th November 2009, 02:04 PM
PabloTwo: Your rpm would be greatly appreciated if you have the chance to make it available for me.
I'll upload it to a file sharing site I use. The rpm file is 3.2MB and I have really slow dialup. I'll post back with an edit to this post with the url when it's there. In the meantime, if you haven't already enabled the RPMFusion repos, you should do so now (check in the Guides and Howto's section or do a search for instructions for doing that) and then install lame and lame-libs ahead of time or let yum do that at the time you install swftools.

RupertKent
6th November 2009, 02:05 PM
I'll upload it to a file sharing site I use. The rpm file is 3.2MB and I have really slow dialup. I'll post back with an edit to this post with the url when it's there.

Many thanks...! :)

PabloTwo
6th November 2009, 04:12 PM
Funny how things "go wrong" just at the "wrong" time. Before tying up my limited bandwidth with the file upload, I wanted to get my online brokerage stuff going. Turns out this morning had to be the morning they updated the java applet code that I use, which means downloading the new stuff into the java cache. Well, that's a few megabytes and normally takes 30 minutes or so, except it all crashed about after about that time and I had to start fresh. Over an hour consumed there.

Then on to the shared file site (mediafire.com) to do the upload. Gosh, they changed the interface and move the upload file(s) button, which now, is broken. Had to go to another site and open an account to do the upload..... jeeeez.

Anyway, here it is: http://www.mediafire.com/?sharekey=8ccc83778a4ac5ea67cd7f7bd65f7eef6d049570 6aeb3ed63e34c0a955f98962

I put the spec file there also for anyone wanting to build an rpm package themselves. Tarball is at http:/www.swftools.org/swftools-0.9.0.tar.gz

You can install using
# yum --nogpgcheck localinstall swftools-0.9.0-1.fc8.i686.rpm
If you don't have the RPMFusion repos enable yet and lame isn't installed, that will fail due to a missing dependency. In that case, you can get around that with:
# rpm -ivh --nodeps --nosignature swftools-0.9.0-1.fc8.i686.rpm
I'll be offline until sometime later this afternoon or evening. If you run into any problems, I won't be able to assist you until then.

Edit: It's later in the day and I've had time to figure out why I couldn't upload to my MediaFire file sharing account. The "Ad Blocking per Gozer" plugin to the Firefox Stylish extension was preventing me from seeing the "click here to select..." window. Since I don't plan on maintaining the 4shared.com account linked to above, I've uploaded the swftools rpm package to the MediaFire site, which I do intend to keep maintained. I've edited the download link above to point to the MediaFire site.

RupertKent
9th November 2009, 08:18 AM
Hi PabloTwo,

Thanks for making the rpm available to us noobs, I for one am most grateful. As soon as I find the correct lame dependency to put on the system I should be good to go. I'll report here with the results.

Again, many thanks.

PabloTwo
9th November 2009, 02:07 PM
To get lame and lame-libs you'll need the RPMFusion repos installed:
su
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
yum install lame lame-libs
lame is needed in order for the wav2swf tool to be functional (lame will encode to mp3 format).
Although there is no change in functionality, I uploaded a more polished version of swftools-0.9.0-1.fc8.i686.rpm yesterday (sunday) afternoon, as well as the .spec file for anyone wanting to roll their own rpm from the source code tarball.

You're quite welcome. I did this as much to further my learning on building rpm packages as to assist you in getting this installed. And it was beneficial to me as I learned at least a couple of new things in the process of working with this package (changing encoding of text files and creating relative symlinks).

Edit: Since this package was built on an F8 host, there is no guarantee there won't be dependency version issues thwarting the install. I'm assuming you're running at least F10 and probably F11. There is a much greater likely hood of getting a package to install/run on a newer Fedora release from the one it was compiled on, than vice versa whereas newer version support dependencies should have a good degree of backwards compatibility while there is never any forward compatibility or support. I'm fairly confident this will work for you, but if not, be sure and let me know. And let me know if it does work out OK as well. It will be interesting to me to see how far up the ladder this build can be pushed.

RupertKent
9th November 2009, 03:32 PM
Hi chaps,

OK. More issues. Alfresco is now throwing errors around like there's no tomorrow. At this time I have to cut my losses and quit working on this thing as it's taken me 10 solid days of work and I still don't have even a half solid system to start working on.

I'll come back to it in due course, but at this time it's mothballed.

Thanks again for your help and I hop what has been discussed and worked on as a response ot my various posts will help others.

Kind Regards,

Rup

PabloTwo
9th November 2009, 03:46 PM
Hi chaps,

OK. More issues. Alfresco is now throwing errors around like there's no tomorrow. At this time I have to cut my losses and quit working on this thing as it's taken me 10 solid days of work and I still don't have even a half solid system to start working on.

I'll come back to it in due course, but at this time it's mothballed.

Thanks again for your help and I hop what has been discussed and worked on as a response ot my various posts will help others.

Kind Regards,

Rup

Well bummer. Sorry to hear your project blew up in your face. I hope you have a better experience with it in any future attempts with Alfresco. Perhaps jpollards suggestion to try this on CentOS might be worth looking into. CentOS is stable to the extreme. F11, depending on where you are on the updates and your hardware configuration, can be like walking on quicksand.

RupertKent
9th November 2009, 03:50 PM
Thanks PT,

Your analogy is very good. It is indeed like being on quicksand. One minute it's fine then all of a sudden it's not. Like trying to ride on the back of a Lion cranked up on Crystal Meth and Tamazipans.

CentOs has been suggested and I will look into this in my spare time.

Again, thanks for your help. I *will* be back...!

Wilhelmstadt Travel Photos on Instagram - Imperatriz Travel Photos - Bolzano