Installing AMC on Arch Linux

Added by Ben French over 8 years ago

I am attempting to install AMC on arch linux. The package builds are no longer available, thus I am compiling from source.
I have installed the prerequsites but I am recieving this error.

fatal error: ppm.h: No such file or directory

I have installed libnetpbm

I assume I need to change the make.conf file to point at Arch linux's netpbm directory?
How can I do this?

thanks in advance


Replies (55)

RE: Installing AMC on Arch Linux - Added by Alexis Bienvenüe over 8 years ago

You can create a new makefile-arch.conf file with the variables you need to overwrite, and then use make SYSTEM_TYPE=arch instead of make.
Have a look at the Makefile.conf file that lists configuration variables.
For libnetpbm, change GCC_NETPBM which defaults to

GCC_NETPBM=-lnetpbm

Maybe you will need extra -I or -L options.

RE: Installing AMC on Arch Linux - Added by Andrés Villaveces over 8 years ago

I had the same problem as Ben French: trying to install AMC on arch linux (manjaro), since the package builds are not available I need to compile from source. Same error message (fatal error: ppm.h: No such file or directory), with libnetpgm installed.

I tried Alexis Bienvenüe's suggestion but compiling became even messier. I did create the new makefile-arch file and tried to change two variables: SYSTEM_TYPE (now set to arch) and GCC_NETPBM (now set to /usr/include/netpbm which is the correct place in this system).

The rest of the new Makefile-arch.conf file is left identical - only those two variables seemed to need a change.

Same message (fatal error: ppm.h: No such file or directory).

I then replaced the old Makefile alltogether by this (without creating Makefile-arch.conf but changing the two variables SYSTEM_TYPE and GCC_NETPBM).

It went a but further but now collapsed on this:

In function `main':
AMC-traitement-image.c:(.text.startup+0x44): undefined reference to `ppm_readppm'
AMC-traitement-image.c:(.text.startup+0x436): undefined reference to `ppm_writeppm'
collect2: error: ld returned 1 exit status
Makefile:120: recipe for target 'AMC-traitement-image' failed
make: *** [AMC-traitement-image] Error 1

There seems to be some problem with the AMC-traitement-image.c file... any suggestion would be welcome!

Thanks in advance

RE: Installing AMC on Arch Linux - Added by Alexis Bienvenüe over 8 years ago

GCC_NETPBM contains options to be passed to the gcc compiler/linker.
If ppm.h is located in the /usr/include/netpbm directory, you should add -I /usr/include/netpbm.
"undefined reference" errors mean gcc can't find the libnetpbm.so file: maybe you forgot a -lnetpbm option.

GCC_NETPBM = -I /usr/include/netpbm -lnetpbm

RE: Installing AMC on Arch Linux - Added by Andrés Villaveces over 8 years ago

Alexis: thank you very much! This was all that was needed (I replaced the -lnetpbm parameter by -I /usr/include/netpbm, thinking mistakenly that I could not pass two parameters in one definition of a variable).

Anyway: it is now installed!

Thanks you again.

RE: Installing AMC on Arch Linux - Added by Ben French over 8 years ago

Alexis Bienvenüe wrote:

GCC_NETPBM contains options to be passed to the gcc compiler/linker.
If ppm.h is located in the /usr/include/netpbm directory, you should add -I /usr/include/netpbm.
"undefined reference" errors mean gcc can't find the libnetpbm.so file: maybe you forgot a -lnetpbm option.

GCC_NETPBM = -I /usr/include/netpbm -lnetpbm

Hi Alexis

I think I managed to complete your last instruction, but now I get

install -d -m 0755 -o root -g root //usr/share/auto-multiple-choice/models/ar
install -m 0644 -o root -g root doc/modeles/ar/*.tgz //usr/share/auto-multiple-choice/models/ar
install: cannot stat 'doc/modeles/ar/*.tgz': No such file or directory
Makefile:181: recipe for target 'install_models_ar' failed
make: *** [install_models_ar] Error 1

Could I ask for your help again.
thanks in advance

RE: Installing AMC on Arch Linux - Added by Alexis Bienvenüe over 8 years ago

Which source files are you using?

RE: Installing AMC on Arch Linux - Added by Ben French over 8 years ago

Alexis Bienvenüe wrote:

Which source files are you using?

Hi Alexis

I was using the source files, but have tried the Precomp version and managed to make and install. But now I get this error

Can't locate AMC/Basic.pm in @INC (you may need to install the AMC::Basic module) (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/lib/AMC/perl/AMC-gui.pl line 45.
BEGIN failed--compilation aborted at /usr/lib/AMC/perl/AMC-gui.pl line 45.

I searched for a solution and found this ticket [[https://trac.macports.org/ticket/47015]] but not sure how to progress from here.

thanks again

RE: Installing AMC on Arch Linux - Added by Alexis Bienvenüe over 8 years ago

AMC was installed in a directory which is not in the default directories where perl is looking for modules.
You can change PERLDIR in the Makefile.conf file to eg. /usr/share/perl5/site_perl and re-install, or make a link to glue this wrong install with the right location:

sudo ln -s /usr/share/perl5/site_perl/AMC /usr/share/perl5/AMC

RE: Installing AMC on Arch Linux - Added by Ben French over 8 years ago

Yeah it works, thanks Alexis

Thank you so much for your time and help.
Your project saves me countless teaching and grading hours.

The teachers of South Africa owe you.

RE: Installing AMC on Arch Linux - Added by Andrés Villaveces over 8 years ago

Just to report that amc has been working since four or five days ago, when I also asked questions - I forgot to confirm. Thank you, Alexis! This project is wonderful.

Greetings from Bogotá, Colombia.

RE: Installing AMC on Arch Linux - Added by Andrés Villaveces over 8 years ago

On the other hand, maybe we should (Ben French or I) create a package for AUR. I have never done that. It would save a lot of time to future arch users who want to install auto-multiple-choice.

At the moment I am just too busy with my own research project, my graduate students, my classes, etc. - but for sure I should learn how to do the packaging for AUR.

RE: Installing AMC on Arch Linux - Added by Thomas LEGRAND over 8 years ago

Hello,

I want to indicate that Alexis had already created a package on AUR 3 but it doesn't exist any more because Archlinux uses AUR 4 thus if Alexis could migrate the package on AUR 4, we can use ACM

RE: Installing AMC on Arch Linux - Added by Thomas LEGRAND over 8 years ago

Sorry for this new post but I forget to link the old package build

http://pkgbuild.com/git/aur-mirror.git/tree/auto-multiple-choice

RE: Installing AMC on Arch Linux - Added by Ben French over 8 years ago

Thomas LEGRAND wrote:

Hello,

I want to indicate that Alexis had already created a package on AUR 3 but it doesn't exist any more because Archlinux uses AUR 4 thus if Alexis could migrate the package on AUR 4, we can use ACM

In reply to Andrés Villaveces, its a good idea. Im happy to assist once the school year is done to get the package on the AUR. I say that naively as I have no idea what it entails. But I will do my best to help get the package up.

RE: Installing AMC on Arch Linux - Added by Thomas LEGRAND over 8 years ago

Hy,

I create a package in aur4 for AMC

RE: Installing AMC on Arch Linux - Added by Andrés Villaveces over 8 years ago

Thomas,

I just tried on another machine the auto-multiple-choice package from aur (aur4).

It seems to work perfectly!

Thank you very much!

Andrés

RE: Installing AMC on Arch Linux - Added by Ben French over 8 years ago

Thank you so much for the build.

I thought my issues were over, but...
When running my exam papers today from TIFF scans in 200 resolutions,I get the following error

Use of uninitialized value in string ne at /usr/lib/AMC/perl/AMC-gui.pl line 4573.
gm convert: Unable to sync cache (check temporary file disk space) (/home/ben/documents/SKMBT_75415112014530.tif) [No space left on device].
Use of uninitialized value in numeric gt (>) at /usr/lib/AMC/perl/AMC-gui.pl line 5

Please help. I have no idea.
How can I be out of space? My hardrive is only 35% full.

I thought running in Sudo would help, but it did not.
Any ideas??

RE: Installing AMC on Arch Linux - Added by Alexis Bienvenüe over 8 years ago

Maybe /tmp is in a partition with no space left? Check with df -h.

RE: Installing AMC on Arch Linux - Added by Ben French over 8 years ago

Hi Alexis

I did give it a try. I increased my /tmpfs in my fstab to 20gigs
After that, one multi page tiff was accepted and error the [cache]msg dissappeard.
However, it will not analyse/split any more scans.
It simply tries to spilt the file, then Analyse() and then nothing.

No error apart from.

Use of uninitialized value in numeric gt (>) at /usr/lib/AMC/perl/AMC-gui.pl line 5

Is there a way I can find out more?

Ps...*my df -h output*

ben@ArchLinux:~$ df -h
Filesystem Size Used Avail Use% Mounted on
dev 1.4G 0 1.4G 0% /dev
run 1.4G 552K 1.4G 1% /run
/dev/sda1 138G 12G 120G 9% /
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
tmpfs 20G 32K 20G 1% /tmp
/dev/sda5 318G 83G 220G 28% /home/ben
tmpfs 268M 4.0K 268M 1% /run/user/1000

RE: Installing AMC on Arch Linux - Added by pierre sallard over 6 years ago

Hi Alexis,
when trying to install AMC on Arch through the AUR package, the process fails to download the required sources from "http://download.gna.org/auto-qcm/auto-multiple-choice_current_precomp.tar.gz ". I suspect you have moved your server somewhere else and that the "download.gna.org" address is not anymore valid. Is it possible to modify accordingly the installation files in AUR ?
Thanks for your marvelous tool anyway.

RE: Installing AMC on Arch Linux - Added by Benoit Landrieu over 5 years ago

Hello,

I have some issues with installing amc on archlinux, I update this topic because I know it concerns arch users !

Do you have a actual solution for installing amc on arch ?

Benoit

RE: Installing AMC on Arch Linux - Added by pierre sallard over 5 years ago

I managed to use AMC on Arch for some times, but since approx 1 year, after some Arch updates, the scan recognition fails. Thus, I installed an Ubuntu machine on Virtualbox and I use AMC on this Ubuntu machine -(

RE: Installing AMC on Arch Linux - Added by Benoit Landrieu over 5 years ago

Thanks to Alexis, I managed to install and apparently it's works correctly, the aur package will be updated soon !

RE: Installing AMC on Arch Linux - Added by Giovanni Giuffrida over 5 years ago

Hi there, I just tried to install AMC on Manjaro (Arch Linux) using "yaourt auto-multiple-choice" but I get an error:

> Validating source files with md5sums...
auto-multiple-choice_current_precomp.tar.gz ... FAILED
amc.patch ... Passed
> ERROR: One or more files did not pass the validity check!
==> ERROR: Makepkg was unable to build auto-multiple-choice.

I guess the md5 of the file is not correct and the installation stops.

Alexis, can someone fix it somehow? Or, do you have any other suggestion I can do on my side?

Thanks a lot.

Giovanni

1 2 3 Next » (1-25/55)