New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faile to compile fontforge. #3902
Comments
This is the same as #3897, did you compile python yourself? Otherwise why is it under /usr/local. Either use your system provided python development package, or recompile with fPIC enabled |
Jeremy Tan <notifications@github.com> 于2019年8月28日周三 下午2:08写道:
This is the same as #3897
<#3897>, did you compile
python yourself? Otherwise why is it under /usr/local. Either use your
system provided python development package, or recompile with fPIC enabled
I use pyenv to manage multiple of pythons:
$ pyenv versions
* system (set by
/home/werner/software/fonts/fontforge.git/build/.python-version)
2.7.13
3.7.3
3.7.4
3.8-dev
3.9-dev
And I've set the python version for compile fontforge the system's version:
$ pyenv local
system
And I also installed the required tools and packages with ( this is debian,
so the following ):
sudo apt-get build-dep fontforge
And I also meet the error.
Another issue: By said: `recompile with fPIC enabled', what's your mean?
Do you mean: for compiling with the self-compiled python, must this option
be used? And, how to set the value of it?
Regards
… —
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3902?email_source=notifications&email_token=ACVDTDSGHNQIAFJRUCSW2Y3QGYI4FA5CNFSM4IQYMXCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5J736I#issuecomment-525598201>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACVDTDWR6VWNTRXVIXHXAADQGYI4FANCNFSM4IQYMXCA>
.
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
|
|
Try also using #3906 |
Jeremy Tan <notifications@github.com> 于2019年8月28日周三 下午7:45写道:
- What's your Debian version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.9 (stretch)
Release: 9.9
Codename: stretch
- What exactly did you do to get /usr/local/lib/libpython3.7*
Strange. I use pyenv to install all version of python. Maybe that is the
remains of my previously installed python without using pyenv.
Anyway, I've remove all of them with the following method ( python without
`make uninstall' )
sudo make -n install |
grep -Po '/usr/local/[^;" ]+' | sort -u |
awk '{ a[$0]=length($0) }END { if ( asorti(a,m, "@val_num_desc" ) ) for ( i
in m ) print m[i] }' | xargs -r -P0 -n1 sudo rm -f
- What version is system python
$ pyenv local system
$ python --version
Python 2.7.13
- Have you installed python3-dev?
Yes.
After I've removed the remains of python installed in /usr/local, I can
successfully compile the fontforge with the system's python. But, when I
try to compile it with the python installed via pyenv, I still will failed
with the similar error:
All of the following are doing in the directory:
~/software/fonts/fontforge.git/build
rm -fr *
cmake -GNinja -fPIC .. # I don't know how to set the -fPIC ;-(
ninja
This step will failed with the following error:
…--------
/usr/bin/ld:
/home/werner/.pyenv/versions/3.7.4/lib/libpython3.7m.a(bytesobject.o):
relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' 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
ninja: build stopped: subcommand failed.
--------
How to solve this issue?
Regards
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3902?email_source=notifications&email_token=ACVDTDXMRDU4HRFNMQ5NLR3QGZQPFA5CNFSM4IQYMXCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5K2WGY#issuecomment-525708059>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACVDTDVZEU4HLOZ72VR4E2DQGZQPFANCNFSM4IQYMXCA>
.
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
|
Try applying the change from here: #3906 Basically if you want to statically link to Python (which you probably don't), then that Python library itself needs to be compiled with |
Jeremy Tan <notifications@github.com> 于2019年8月28日周三 下午9:12写道:
Sorry for my limited knowledge on the git. I don't know what do you want
me to do by saying that.
I tried `git pull', but the git repo is still up-to-date. And on the above
link you given, I cann't find any instructive things.
Any hints?
… Basically if you want to statically link to Python (which you probably
don't), then that Python library itself needs to be compiled with -fPIC
passed to gcc. Also we currently only support Python 3 or later.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3902?email_source=notifications&email_token=ACVDTDSVQRXMAP6Z3TWBLGTQGZ2T7A5CNFSM4IQYMXCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5LCGUQ#issuecomment-525738834>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACVDTDXUNR6GNM4ZMO3HECTQGZ2T7ANCNFSM4IQYMXCA>
.
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
|
Sorry if this is obvious (I mostly write it for Googlers trying to compile the 20190801 release), but Python isn't really a hard requirement. If you don't need it, you can pass |
@hongyi-zhao You need (順便說說,你好,來自菲律賓!) |
Fredrick Brennan <notifications@github.com> 于2019年8月28日周三 下午9:28写道:
@hongyi-zhao <https://github.com/hongyi-zhao> You need git fetch origin;
git checkout pyr before ninja.
Doing the following steps, still failed:
All the commands starts here:
~/software/fonts/fontforge.git
$ git fetch origin
$ git checkout pyr
$ pyenv version
3.7.4 (set by /home/werner/.pyenv/version)
$ mkdir build
$ cd build
$ cmake -GNinja ..
The error:
…---
CMake Error at
/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138
(message):
Could NOT find Python3 (missing: Python3_LIBRARY Development) (found
suitable version "3.7.4", minimum required is "3.3")
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378
(_FPHSA_FAILURE_MESSAGE)
cmake/backports/3.14.5/FindPython/Support.cmake:1181
(find_package_handle_standard_args)
cmake/backports/3.14.5/FindPython3.cmake:181 (include)
cmake/PackageUtils.cmake:41 (find_package)
CMakeLists.txt:116 (find_package_auto)
-- Configuring incomplete, errors occurred!
---
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3902?email_source=notifications&email_token=ACVDTDT4F7KCJPOTUJDSM2DQGZ4RHA5CNFSM4IQYMXCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5LDZIQ#issuecomment-525745314>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACVDTDVDHOSWRLRHHIWIZGLQGZ4RHANCNFSM4IQYMXCA>
.
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
|
That's working as intended then. It's saying it can't find a suitable shared library to link to. Follow these steps: https://github.com/pyenv/pyenv/wiki#how-to-build-cpython-with---enable-shared You need to build/install Python as a shared library when you install via pyenv. Although my suggestion is to not use pyenv and use system python instead. |
Jeremy Tan <notifications@github.com> 于2019年8月29日周四 上午5:46写道:
That's working as intended then. It's saying it can't find a suitable
shared library to link to.
Follow these steps:
https://github.com/pyenv/pyenv/wiki#how-to-build-cpython-with---enable-shared
You need to build/install Python as a shared library when you install via
pyenv.
Thanks a lot, it does the trick.
… Although my suggestion is to not use pyenv and use system python instead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3902?email_source=notifications&email_token=ACVDTDTX24YZD6CBHAELVBDQG3W4DA5CNFSM4IQYMXCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5MSHGY#issuecomment-525935515>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACVDTDVHSM3BGFQYJ66P32DQG3W4DANCNFSM4IQYMXCA>
.
--
Hongsheng Zhao <hongyi.zhao@gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
|
Hi,
I try to compile fontforge as follows:
cd fontforge
mkdir build
cd build
cmake -GNinja ..
ninja
This step, I meet the following error:
/usr/bin/ld: /usr/local/lib/libpython3.7m.a(bytesobject.o): relocation R_X86_64_PC32 against symbol `_Py_NoneStruct' 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
ninja: build stopped: subcommand failed.
How to resolve it?
Regards
The text was updated successfully, but these errors were encountered: