sudo apt-add-repository ppa:swi-prolog/stable sudo apt-get update sudo apt-get install swi-prolog
sudo apt-add-repository ppa:swi-prolog/devel sudo apt-get update sudo apt-get install swi-prolog
W: Failed to fetch http://ppa.launchpad.net/swi-prolog/devel/ubuntu/dists/wheezy/main/source/Sources 404 Not Found W: Failed to fetch http://ppa.launchpad.net/swi-prolog/devel/ubuntu/dists/wheezy/main/binary-armhf/Packages 404 Not Found W: Failed to fetch http://ppa.launchpad.net/swi-prolog/stable/ubuntu/dists/wheezy/main/source/Sources 404 Not Found W: Failed to fetch http://ppa.launchpad.net/swi-prolog/stable/ubuntu/dists/wheezy/main/binary-armhf/Packages 404 Not Found
pi@raspberrypi ~/Desktop/swipl-devel $ ./build All submodules are up-to-date WARNING: Cannot find documentation in man/Manual. See README.git WARNING: and README.doc for further information. Your kit is prepared. Please consult INSTALL for further instructions. make[1]: Entering directory '/home/pi/Desktop/swipl-devel/src' **************** Making SWI-Prolog 7.3.25 for armv6l-linux To be installed in /usr/local/bin/swipl make[2]: Entering directory '/home/pi/Desktop/swipl-devel/src/rc' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/pi/Desktop/swipl-devel/src/rc' make[2]: Entering directory '/home/pi/Desktop/swipl-devel/src/libtai' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/home/pi/Desktop/swipl-devel/src/libtai' cp ./SWI-Prolog.h ../include/SWI-Prolog.h Home (libraries) in /usr/local/lib/swipl-7.3.25 gcc -rdynamic -O2 -pthread -Wl,-rpath=/usr/local/lib/swipl-7.3.25/lib/armv6l-linux \ -I. -I. -Wall -O2 -fno-strict-aliasing -pthread -fPIC -o swipl-ld ./swipl-ld.c **************** No GIT version change rm -f ../lib/armv6l-linux/libswipl.a gcc -shared -O2 -o ../lib/armv6l-linux/libswipl.so.7.3.25 -Wl,-soname=libswipl.so.7.3 \ pl-atom.o pl-wam.o pl-arith.o pl-bag.o pl-error.o pl-comp.o pl-rc.o pl-dwim.o pl-ext.o pl-flag.o pl-funct.o pl-gc.o pl-privitf.o pl-list.o pl-string.o pl-load.o pl-modul.o pl-op.o pl-prims.o pl-pro.o pl-proc.o pl-prof.o pl-read.o pl-rec.o pl-setup.o pl-sys.o pl-trace.o pl-util.o pl-wic.o pl-write.o pl-term.o pl-thread.o pl-xterm.o pl-srcfile.o pl-beos.o pl-attvar.o pl-gvar.o pl-btree.o pl-init.o pl-gmp.o pl-segstack.o pl-hash.o pl-version.o pl-codetable.o pl-supervisor.o pl-dbref.o pl-termhash.o pl-variant.o pl-copyterm.o pl-debug.o pl-cont.o pl-ressymbol.o pl-dict.o pl-trie.o pl-indirect.o pl-tabling.o os/pl-buffer.o os/pl-ctype.o os/pl-file.o os/pl-files.o os/pl-glob.o os/pl-os.o os/pl-stream.o os/pl-string.o os/pl-table.o os/pl-text.o os/pl-utf8.o os/pl-fmt.o os/pl-dtoa.o os/pl-option.o os/pl-cstack.o os/pl-codelist.o os/pl-prologflag.o os/pl-rl.o os/pl-tai.o os/pl-locale.o rc/access.o rc/build.o rc/html.o rc/util.o libtai/caltime_utc.o libtai/caltime_tai.o libtai/leapsecs_sub.o libtai/leapsecs_add.o libtai/caldate_fmjd.o libtai/caldate_mjd.o libtai/leapsecs_init.o libtai/leapsecs_read.o libtai/tai_pack.o libtai/tai_unpack.o -rdynamic -O2 -pthread -Wl,-rpath=/usr/local/lib/swipl-7.3.25/lib/armv6l-linux -lgmp -lrt -lreadline -lncurses -lm -lrt -ldl ar r ../lib/armv6l-linux/libswipl.a pl-atom.o pl-wam.o pl-arith.o pl-bag.o pl-error.o pl-comp.o pl-rc.o pl-dwim.o pl-ext.o pl-flag.o pl-funct.o pl-gc.o pl-privitf.o pl-list.o pl-string.o pl-load.o pl-modul.o pl-op.o pl-prims.o pl-pro.o pl-proc.o pl-prof.o pl-read.o pl-rec.o pl-setup.o pl-sys.o pl-trace.o pl-util.o pl-wic.o pl-write.o pl-term.o pl-thread.o pl-xterm.o pl-srcfile.o pl-beos.o pl-attvar.o pl-gvar.o pl-btree.o pl-init.o pl-gmp.o pl-segstack.o pl-hash.o pl-version.o pl-codetable.o pl-supervisor.o pl-dbref.o pl-termhash.o pl-variant.o pl-copyterm.o pl-debug.o pl-cont.o pl-ressymbol.o pl-dict.o pl-trie.o pl-indirect.o pl-tabling.o os/pl-buffer.o os/pl-ctype.o os/pl-file.o os/pl-files.o os/pl-glob.o os/pl-os.o os/pl-stream.o os/pl-string.o os/pl-table.o os/pl-text.o os/pl-utf8.o os/pl-fmt.o os/pl-dtoa.o os/pl-option.o os/pl-cstack.o os/pl-codelist.o os/pl-prologflag.o os/pl-rl.o os/pl-tai.o os/pl-locale.o rc/access.o rc/build.o rc/html.o rc/util.o libtai/caltime_utc.o libtai/caltime_tai.o libtai/leapsecs_sub.o libtai/leapsecs_add.o libtai/caldate_fmjd.o libtai/caldate_mjd.o libtai/leapsecs_init.o libtai/leapsecs_read.o libtai/tai_pack.o libtai/tai_unpack.o ar: creating ../lib/armv6l-linux/libswipl.a ranlib ../lib/armv6l-linux/libswipl.a ( cd ../lib/armv6l-linux && rm -f libswipl.so && ln -s libswipl.so.7.3.25 libswipl.so ) ( cd ../lib/armv6l-linux && rm -f libswipl.so.7.3 && ln -s libswipl.so.7.3.25 libswipl.so.7.3 ) gcc -rdynamic -O2 -pthread -Wl,-rpath=/usr/local/lib/swipl-7.3.25/lib/armv6l-linux -o swipl pl-main.o -L../lib/armv6l-linux -lswipl ../lib/armv6l-linux/libswipl.so: undefined reference to `__sync_add_and_fetch_8' collect2: ld returned 1 exit status Makefile:212: recipe for target 'swipl' failed make[1]: *** [swipl] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/pi/Desktop/swipl-devel/src' Makefile:22: recipe for target 'lite' failed make: *** [lite] Error 2
pi@raspberrypi ~/Desktop/website $ swipl Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 7.2.3-2-g71dd8c0) Copyright (c) 1990-2015 University of Amsterdam, VU Amsterdam SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details. For help, use ?- help(Topic). or ?- apropos(Word). ?- [basic_site]. ERROR: /home/pi/Desktop/website/basic_site.pl:1: source_sink `library(http/thread_httpd)' does not exist Warning: /home/pi/Desktop/website/basic_site.pl:1: Goal (directive) failed: user:use_module(library(http/thread_httpd)) ERROR: /home/pi/Desktop/website/basic_site.pl:2: source_sink `library(http/http_dispatch)' does not exist Warning: /home/pi/Desktop/website/basic_site.pl:2: Goal (directive) failed: user:use_module(library(http/http_dispatch)) ERROR: /home/pi/Desktop/website/basic_site.pl:3: source_sink `library(http/http_error)' does not exist Warning: /home/pi/Desktop/website/basic_site.pl:3: Goal (directive) failed: user:use_module(library(http/http_error)) ERROR: /home/pi/Desktop/website/basic_site.pl:4: source_sink `library(http/html_write)' does not exist Warning: /home/pi/Desktop/website/basic_site.pl:4: Goal (directive) failed: user:use_module(library(http/html_write)) ERROR: /home/pi/Desktop/website/basic_site.pl:9: catch/3: Undefined procedure: http_handler/3 Warning: /home/pi/Desktop/website/basic_site.pl:9: Goal (directive) failed: user:http_handler(/,say_hi,[]) true.
sudo apt-get update
sudo apt-get dist-upgradesudo apt-get update
sudo apt-get upgradeOpened /etc/apt/sources.list in a editor and replaced the name wheezy with jessie.
sudo nano /etc/apt/sources.listThen updated the package list again, to access newer jessie packages:
sudo apt-get updatenow installed GCC 4.9
sudo apt-get install gcc-4.9 g++-4.9Reverted back from Jessie to Wheezy, in /etc/apt/sources.list
Then did another update.
sudo nano /etc/apt/sources.list
sudo apt-get updateThen removed all gcc alternatives.
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++Then set gcc alternatives with more priority to GCC 4.9 version.
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9