* * *

Author Topic: Installing with FPCUp  (Read 2494 times)

argb32

  • Jr. Member
  • **
  • Posts: 58
Installing with FPCUp
« on: June 02, 2016, 10:33:57 pm »
Hi!
I making a FPC auto-install feature and try to use FPCUp for this but it fails both on Linux and Windows.

On Linux (Ubuntu 15.10) I get the following error log:
Code: Pascal  [Select]
  1. === fpcup: info: Running make all install for FPC:
  2. === Executing : make "--jobs=4" "FPC=/home/me/fpc/fpc/bootstrap/ppcx64" "--directory=/home/me/fpc/fpc/up" "INSTALL_PREFIX=/home/me/fpc/fpc/up" "INSTALL_BINDIR=/home/me/fpc/fpc/up/bin/x86_64-linux" "OVERRIDEVERSIONCHECK=1" "OPT=-Sg -vi-n-h- " "all" "install" (working dir: /home/me/fpc/fpc/up)
  3. === make: Entering directory '/home/me/fpc/fpc/up'
  4. === Makefile:29: *** You need the GNU utils package to use this Makefile.  Stop.
  5. === make: Leaving directory '/home/me/fpc/fpc/up'
  6. ===
  7. === fpcup: info: FPC: Running fpc make all install failed with exit code 512
  8. === Details:
  9. === fpcup: ERROR: Error running BuildModuleCustom for module FPC
  10. === fpcup: info: Error running fpcup. Technical details: error executing sequence FPC; line: 5, param: FPC
  11. === fpcup: info: Error running fpcup. Technical details: error executing sequence Only; line: 1, param: FPC
  12. === Fpcup failed.
  13.  

binutils as well as build-essential packages are installed. Does someone have any ideas what is going wrong?

On Windows (Windows 7 64-bit) the error log is:
Code: Pascal  [Select]
  1. === fpcup: WARNING: No OpenSLL library files available. Going to download them
  2. === fpcup: info: Going to download C:\Users\IEUser\AppData\Local\Temp\TMP00000.tmp.zip from URL: http://indy.fulgan.com/SSL/openssl-1.0.2e-i386-win32.zip
  3. === fpcup: info: Download http(s) result: 403; for URL: http://indy.fulgan.com/SSL/openssl-1.0.2e-i386-win32.zip
  4. === fpcup: WARNING: Could not find svn executable in or under C:\dist\fpc\fpc\binutils\svn\
  5. === fpcup: info: Going to download SVN
  6. === fpcup: info: Going to download C:\Users\IEUser\AppData\Local\Temp\TMP00000.tmp.zip from URL: https://www.visualsvn.com/files/Apache-Subversion-1.9.1.zip
  7. === fpcup: info: Download http(s) result: 500; for URL: https://www.visualsvn.com/files/Apache-Subversion-1.9.1.zip
  8. === fpcup: info: ERROR downloading SVN client from https://www.visualsvn.com/files/Apache-Subversion-1.9.1.zip
  9. === fpcup: ERROR: Could not find SVN executable. Please make sure it is installed.
  10. === fpcup: info: Error running fpcup. Technical details: error executing sequence FPC; line: 2, param: FPC
  11. === fpcup: info: Error running fpcup. Technical details: error executing sequence Only; line: 1, param: FPC
  12. === Fpcup failed.
  13.  

The problem seems to be in the OpenSSL link:
http://indy.fulgan.com/SSL/openssl-1.0.2e-i386-win32.zip
Now it is protected with captcha and can't be downloaded automaitcally. The 500 error with subversion download link probably caused by failed OpenSSL download as in a browser it downloads successfully.
But what I should do with this?

settings file used:
Code: [Select]
[stable]
fpcdir=/home/me/fpc/fpc/up
fpcurl=http://svn.freepascal.org/svn/fpc/tags/release_3_0_0
; Do not create a batch file with shortcut
fpcuplinkname=""
; We can use the binutils/bootstrap dirs that we usually use:
binutilsdir=/home/me/fpc/fpc/binutils
fpcbootstrapdir=/home/me/fpc/fpc/bootstrap
; Just install/update, no questions asked:
noconfirm=true
; In case you want to submit patches, it's nice to be able to update
; without overwriting your fixes:
keeplocalchanges=true
; Specify we only want FPC, not Lazarus
; in case of fpc patches FPCBuildOnly
; Use fpc -Px86_64 for cross compiling to 64 bit.
only=FPC
skip=helplazarus,lazarus,lazbuild,useride

argb32

  • Jr. Member
  • **
  • Posts: 58
Re: Installing with FPCUp
« Reply #1 on: June 25, 2016, 12:41:25 pm »
I've attached full log with --verbose option for Linux 64-bit.

Work and bootstrap directories were empty before running FPCUp.

Edit: attached windows log.
« Last Edit: June 25, 2016, 01:16:19 pm by argb32 »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 632
Re: Installing with FPCUp
« Reply #2 on: June 25, 2016, 02:46:31 pm »
Well, it's rather easy, because your logfiles tell it all !

Linux:
"You need the GNU utils package to use this Makefile"

E.g. the FPC makefile cannot find the pwd utility that comes with the utils package.
To test: just run pwd from your command prompt, after you have installed the utils.


Windows:
"Download http(s) result: 403; for URL: http://indy.fulgan.com/SSL/openssl-1.0.2e-i386-win32.zip"
"ERROR downloading SVN client from https://www.visualsvn.com/files/Apache-Subversion-1.9.1.zip"

The necessary openssl files and svn client cannot be downloaded due to unknown reasons.
First, make sure that they can be downloaded. Then, try to run fpcup again.

rvk

  • Hero Member
  • *****
  • Posts: 2384
Re: Installing with FPCUp
« Reply #3 on: June 25, 2016, 02:56:55 pm »
The necessary openssl files and svn client cannot be downloaded due to unknown reasons.
I just checked. indy.fulgan.com resolves to ip 104.25.208.9 which is in fact protected by the service CloudFlare. CloudFlare protects against DDOS and other malicious access. When a connection is suspect it will show a captcha screen. (prove indy.fulgan.com is protected by CloudFlare: https://censys.io/ipv4/104.25.208.9)

DonAlfredo

  • Hero Member
  • *****
  • Posts: 632
Re: Installing with FPCUp
« Reply #4 on: June 25, 2016, 03:30:46 pm »
Thanks !
Any idea how to solve / circumvent ?

shobits1

  • Sr. Member
  • ****
  • Posts: 262
  • .
Re: Installing with FPCUp
« Reply #5 on: June 25, 2016, 03:37:23 pm »
On windows,,
maybe downloading "openssl-1.0.2e-i386-win32.zip" file manually from the browser and extracting it to the same directory as fpcup.exe would solve the openssl problem (assuming fpcup won't try to re-download it.)

rvk

  • Hero Member
  • *****
  • Posts: 2384
Re: Installing with FPCUp
« Reply #6 on: June 25, 2016, 03:39:15 pm »
One possibility could be to use a different download-source. Or in case the  indy.fulgan.com fails you could try an alternative (automatically). I don't think FPC itself has one on SF but there are several others to be found on the net.

The unofficial informal list can be found here
(but there are more, but none as complete as fulgan. And lots have .msi or .exe installs):
https://wiki.openssl.org/index.php/Binaries
« Last Edit: June 25, 2016, 03:59:31 pm by rvk »

argb32

  • Jr. Member
  • **
  • Posts: 58
Re: Installing with FPCUp
« Reply #7 on: June 25, 2016, 04:20:40 pm »
E.g. the FPC makefile cannot find the pwd utility that comes with the utils package.
To test: just run pwd from your command prompt, after you have installed the utils.

As I know pwd is a standard UNIX command which prints current working directory.
Which package should I install?
binutils and coreutils are installed.

About problem on Windows: here people also complains about captcha.

Possible solutions:
1. If FPCUp needs certain OpenSSL version it may be placed at some site and FPCUp can download it from that site.
I can provide such service: http://www.siberika.com/downloads/fpcup/openssl-1.0.2e-i386-win32.zip

2. As rvk said just use another download source.

rvk

  • Hero Member
  • *****
  • Posts: 2384
Re: Installing with FPCUp
« Reply #8 on: June 25, 2016, 04:29:24 pm »
@DonAlfredo
Is it allowed to put a mirror copy of the openssl zip files (latest version for 32 and 64bit Windows) on
https://github.com/LongDirtyAnimAlf/Reiniero-fpcup/tree/master/bin
?

That way you could first try to download it from indy.fulgan.com and if that fails you can fallback on the copy on github.

Bart

  • Hero Member
  • *****
  • Posts: 2596
    • Bart en Mariska's Webstek
Re: Installing with FPCUp
« Reply #9 on: June 25, 2016, 07:26:22 pm »
Windows: If you install svn client and OpenSSL fpc-up should stop complaining, it only downloads them because you don't have them.
This should solve your problem (it does not solve the underlying issue though).

Bart

argb32

  • Jr. Member
  • **
  • Posts: 58
Re: Installing with FPCUp
« Reply #10 on: June 26, 2016, 12:35:05 am »
Bart, unfortunately it doesn't solve my problem as my goal is to make an auto-install feature for FPC which should work on any computer.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 632
Re: Installing with FPCUp
« Reply #11 on: June 26, 2016, 12:29:39 pm »
@all

Thanks for all the info and advice and help !

About self-hosting.

This is by far the most easy way to solve these issues.
In fact, I could even host all needed recent bootstrap compilers and all the necessary libraries on GitHub.

Problem: this is against BigChimp's (original author) foundation for fpcup.
He wanted fpcup as the tool to setup FPC and Lazarus from reliable and standard online resources.

Fpcup works good in environments that have a normal access to the needed sources.
Fpcup cannot handle all (nearly infinite) possible deviations from a normal setup.

So, due to this legacy, I am not directly in favor of self-hosting to solve non-common Internet access problems.
But perhaps I am a bit too much lingering in the past and my interpretation of BigChimps objectives.
Am I ?

The openssl problem is easy solved by just copying the needed files (libeay32.dll,ssleay32.dll) into the fpcup directory.
If they are available, they will not be downloaded again !
Same is valid for the svn client.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus