LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-19-2019, 12:12 PM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,583
Blog Entries: 19

Rep: Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454
Compilation errors while trying to build PyICU in LFS 8.4


I'm trying to install the genealogical program gramps, which isn't in the book. It's a python 3 program which uses python bindings to various libraries. Two of these, pygobject and pycairo, are in the book. bsddb3 isn't but I was able to build it successfully. pyicu I cannot build. I get these messages
Code:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include/python3.7m -c common.cpp -o build/temp.linux-x86_64-3.7/common.o -DPYICU_VER="1.9.5"
In file included from /usr/include/python3.7m/Python.h:89,
                 from common.h:33,
                 from common.cpp:24:
common.cpp: In function ‘PyObject* PyUnicode_FromUnicodeString(const UChar*, int)’:
/usr/include/python3.7m/unicodeobject.h:452:35: error: invalid conversion from Py_UCS2*’ {aka ‘short unsigned int*’} to ‘UChar*’ {aka ‘char16_t*’} [-fpermissiv]
 #define PyUnicode_2BYTE_DATA(op) ((Py_UCS2*)PyUnicode_DATA(op))
                                  ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
common.cpp:226:22: note: in expansion of macro ‘PyUnicode_2BYTE_DATA’
             u_memcpy(PyUnicode_2BYTE_DATA(result), utf16, len16);
                      ^~~~~~~~~~~~~~~~~~~~
In file included from common.cpp:29:
/usr/include/unicode/ustring.h:748:17: note:   initializing argument 1 of ‘UChar* u_memcpy_63(UChar*, const UChar*, int32_t)’
 u_memcpy(UChar *dest, const UChar *src, int32_t count);
          ~~~~~~~^~~~
error: command 'gcc' failed with exit status 1
Clearly there are incompatibilities between the code and at least 2 system headers: python3.7m/unicodeobject.h (referenced in Python.h) and unicode/ustring.h. But it's impossible to see from this output which is actually an error. Or perhaps they both are! Usually gcc clearly distinguishes errors from warnings, but not in this case.

Googling suggested adding -std=c++11 to CFLAGS, but I have done the build with and without this and the errors are exactly the same.

In the end I compiled gramps without icu support, but it probably won't handle Polish names very well. I'd like to do it properly.

Last edited by hazel; 04-19-2019 at 12:15 PM.
 
Old 04-20-2019, 02:18 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,863

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
I would rather say the python3 include files and the PyICU sources are incompatible with each others. But it is only a guess.
 
Old 04-20-2019, 08:14 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,583

Original Poster
Blog Entries: 19

Rep: Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454
Gramps has been a python3 program for the last two major releases, so it should be possible to make python3 versions of all the required bindings. But I checked the gramps README again and it turns out that PyICU is optional, though recommended. It's used mainly for sorting in foreign languages and there are internal sorting mechanisms that can be used instead. Gramps gives me a warning about not finding it when I start it up but I can live with that.

I'll check on AntiX and see what apt says about the dependencies of gramps. The gramps slackbuild says you definitely need it.

Last edited by hazel; 04-20-2019 at 09:09 AM.
 
Old 04-20-2019, 09:14 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,583

Original Poster
Blog Entries: 19

Rep: Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454Reputation: 4454
Hm, interesting. The Debian repo that AntiX uses gives python3-icu as one of the dependencies of gramps. This has libicu57 (the only version of this library in the repository) as a dependency. But on LFS I'm using icu-63. So it seems that if there is an incompatibility, it crept in somewhere between those two icu releases.

I don't think it's worth backporting icu-57 to LFS just to prove a point, given that the icu module is apparently not essential for gramps to function. But would seem to be the solution, so I'll close the thread.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] i can't perfome make install commond while build binutils-build LFS plzzz help me Carl_cj Linux From Scratch 19 09-04-2014 11:52 AM
[SOLVED] LFS: Error during Linux-3.5.2 kernel compilation (LFS 7.2, Section 8.3) erkant Linux From Scratch 10 11-30-2012 02:44 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Will compiling LFS on an 64 bit distro build an 64 bit LFS? Vampirite Linux From Scratch 4 08-31-2007 02:48 PM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration