You are not logged in.

#1 2015-04-23 16:31:55

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Python2 won't build from AUR

I'm trying to build python2 from source by running

Python2:

 yaourt -Sb python2

I don't make any changes to PKGBUILD. What I get is tons of errors for every compile command like this:

ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

then finally:

/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Python build finished, but the necessary bits to build these modules were not found:
bsddb185           dl                 imageop         
sunaudiodev                                           

followed by an ERROR and abort in yaourt.


This has got me puzzled and the typical searching google and forums is not producing any results. Anyone know how to solve this?

Offline

#2 2015-04-23 16:37:06

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,420
Website

Re: Python2 won't build from AUR

First off, why are you trying to rebuild Python2?

This looks like a deeper issue with your system. Start by posting the output of "pacman -Su" and "pacman -Qm"


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-04-23 16:41:01

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Python2 won't build from AUR

Do you have the entire base-devel group installed?

Offline

#4 2015-04-23 16:43:08

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

Alad wrote:

First off, why are you trying to rebuild Python2?

Why not?

Alad wrote:

This looks like a deeper issue with your system. Start by posting the output of "pacman -Su" and "pacman -Qm"

[spdrfall@machine bin]$ sudo pacman -Su
[sudo] password for spdrfall:
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (2) glibc-2.21-3  unrar-1:5.2.7-1

Total Download Size:    8.25 MiB
Total Installed Size:  35.61 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
 glibc-2.21-3-x86_64                                       8.1 MiB   709K/s 00:12 [###############################################]  98%
 unrar-1:5.2.7-1-x86_64                                    8.2 MiB   705K/s 00:12 [###############################################] 100%
(2/2) checking keys in keyring                                                    [###############################################] 100%
(2/2) checking package integrity                                                  [###############################################] 100%
(2/2) loading package files                                                       [###############################################] 100%
(2/2) checking for file conflicts                                                 [###############################################] 100%
(2/2) checking available disk space                                               [###############################################] 100%
(1/2) upgrading glibc                                                             [###############################################] 100%
(2/2) upgrading unrar                                                             [###############################################] 100%

I had two updates in the interm, but runs fine. Everything else runs fine on the system

[spdrfall@machine bin]$ sudo pacman -Qm
android-sdk r24.1.2-1
android-studio 1.1.0-1
arj 3.10.22-10
broadcom-wl 6.30.223.248-6
google-chrome 42.0.2311.90-1
linux-mainline 4.0-1
linux-mainline-docs 4.0-1
linux-mainline-headers 4.0-1
mingw-w64-openblas-lapack 0.2.14-1
package-query 1.5-2
python2-bugzilla 1.0.0-1
python2-theano 0.7.0-2
rstudio-desktop-git 0.99.372-1
rtl8192du-git 9b87522-4
thermald 1.3-2
yaourt 1.5-1

Offline

#5 2015-04-23 16:44:35

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

Scimmia wrote:

Do you have the entire base-devel group installed?

Yessir

[spdrfall@machine bin]$ yaourt -S base-devel
:: There are 26 members in group base-devel:
:: Repository core
   1) autoconf  2) automake  3) binutils  4) bison  5) fakeroot  6) file  7) findutils  8) flex  9) gawk  10) gcc  11) gettext
   12) grep  13) groff  14) gzip  15) libtool  16) m4  17) make  18) pacman  19) patch  20) pkg-config  21) sed  22) sudo  23) texinfo
   24) util-linux  25) which
:: Repository archassault
   26) automake1.11

Enter a selection (default=all): 
warning: autoconf-2.69-2 is up to date -- reinstalling
warning: automake-1.15-1 is up to date -- reinstalling
warning: binutils-2.25-2 is up to date -- reinstalling
warning: bison-3.0.4-1 is up to date -- reinstalling
warning: fakeroot-1.20.2-1 is up to date -- reinstalling
warning: file-5.22-1 is up to date -- reinstalling
warning: findutils-4.4.2-6 is up to date -- reinstalling
warning: flex-2.5.39-1 is up to date -- reinstalling
warning: gawk-4.1.1-1 is up to date -- reinstalling
warning: gcc-4.9.2-4 is up to date -- reinstalling
warning: gettext-0.19.4-1 is up to date -- reinstalling
warning: grep-2.21-2 is up to date -- reinstalling
warning: groff-1.22.3-3 is up to date -- reinstalling
warning: gzip-1.6-1 is up to date -- reinstalling
warning: libtool-2.4.6-1 is up to date -- reinstalling
warning: m4-1.4.17-1 is up to date -- reinstalling
warning: make-4.1-1 is up to date -- reinstalling
warning: pacman-4.2.1-1 is up to date -- reinstalling
warning: patch-2.7.5-1 is up to date -- reinstalling
warning: pkg-config-0.28-2 is up to date -- reinstalling
warning: sed-4.2.2-3 is up to date -- reinstalling
warning: sudo-1.8.13-1 is up to date -- reinstalling
warning: texinfo-5.2-3 is up to date -- reinstalling
warning: util-linux-2.26.1-3 is up to date -- reinstalling
warning: which-2.21-1 is up to date -- reinstalling
warning: automake1.11-1.11.6-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Offline

#6 2015-04-23 17:03:15

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Python2 won't build from AUR

The fact that pacman -Su did anything is a bad sign. It means you've been doing partial updates. You also seem to have unsupported 3rd party repos enabled. All of that is important information.

Really, though, I'm not sure there's a problem here if the build finished.

Offline

#7 2015-04-23 17:07:32

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

Scimmia wrote:

The fact that pacman -Su did anything is a bad sign. It means you've been doing partial updates. You also seem to have unsupported 3rd party repos enabled. All of that is important information.

Really, though, I'm not sure there's a problem here if the build finished.

I ran yaourt -Syyua, then didn't update, that is all. Its not a bad sign.

Offline

#8 2015-04-24 06:18:54

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Python2 won't build from AUR

Hi spdrfall,

I tried to compile the package in a clean chroot for both i686 and x64 architectures and I confirm that there are some error messages like the following

ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

but the compilation itself ended without any problem. Have you tried to use makepkg directly instead of yaourt?


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#9 2015-04-24 07:50:34

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: Python2 won't build from AUR

spdrfall wrote:

I ran yaourt -Syyua, then didn't update, that is all. Its not a bad sign.

Well, if you do that, you have updated repos with old packages locally. If you install a new package, it might be problematic as it can depend on a new version of a package you didn't update. An easy way to check if there are updates is to use the checkupdates script. So, please update and then try building the package using makepkg.

EDIT:

spdrfall wrote:
Alad wrote:

First off, why are you trying to rebuild Python2?

Why not?

Because it is provided and recompiling is usually only necessary when you want to enable some feature that was not provided using the original PKGBUILD. Did you edit the PKGBUILD? Also, speed gains are marginal.

Last edited by runical (2015-04-24 07:59:34)

Offline

#10 2015-04-24 16:50:36

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

mauritiusdadd wrote:

Hi spdrfall,

I tried to compile the package in a clean chroot for both i686 and x64 architectures and I confirm that there are some error messages like the following

ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

but the compilation itself ended without any problem. Have you tried to use makepkg directly instead of yaourt?

Good idea! Just tried that and it runs the same, errors out.

Offline

#11 2015-04-24 16:51:26

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

runical wrote:
spdrfall wrote:
Alad wrote:

First off, why are you trying to rebuild Python2?

Why not?

Because it is provided and recompiling is usually only necessary when you want to enable some feature that was not provided using the original PKGBUILD. Did you edit the PKGBUILD? Also, speed gains are marginal.

Different strokes for different folks I guess.

Offline

#12 2015-04-24 17:07:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Python2 won't build from AUR

Can you post more of your build log (makepkg -L will log to a text file). I'm thinking there has to be another error somewhere.

Offline

#13 2015-04-24 17:24:16

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

Scimmia wrote:

Can you post more of your build log (makepkg -L will log to a text file). I'm thinking there has to be another error somewhere.

I definitely agree... there is an oddity that is not readily presenting itself.

Build_log:
http://pastebin.com/00s0sJap

Check_log:
http://pastebin.com/FSyu0Mfe

Package_log_p1:
http://pastebin.com/5ehTSqRN
Package_log_p2:
http://pastebin.com/8AkWrG2u

Offline

#14 2015-04-24 17:45:01

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: Python2 won't build from AUR

In the logs you provided there are several error messages like the following

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_PC32 against symbol `PyBuffer_IsContiguous' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Can you try to rebuild the package adding -fPIC to your CFLAGS?

Last edited by mauritiusdadd (2015-04-24 17:47:25)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#15 2015-04-24 17:47:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,694

Re: Python2 won't build from AUR

One line above the output originally posted:

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_PC32 against symbol `PyBuffer_IsContiguous' can not be used when making a shared object; recompile with -fPIC

This is most likely the problem.

Offline

#16 2015-04-24 17:52:21

spdrfall
Member
Registered: 2015-04-23
Posts: 9

Re: Python2 won't build from AUR

mauritiusdadd wrote:

In the logs you provided there are several error messages like the following

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_PC32 against symbol `PyBuffer_IsContiguous' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Can you try to rebuild the package adding -fPIC to your CFLAGS?



rebuilt with:

CFLAGS="-march=native -mtune=native -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC"

and still got (among many other errors):

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_PC32 against symbol `PyBuffer_IsContiguous' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

Offline

Board footer

Powered by FluxBB