Failed to install Plone 5.2 on FreeBSD 12.0

Hello,

Can anyone help me fix this error:

src/_imagingft.c:108:9: error: unknown type name 'raqm_glyph_t_01'; did you mean 'raqm_glyph_t'?
typedef raqm_glyph_t_01* (*t_raqm_get_glyphs_01) (raqm_t *rq,
^~~~~~~~~~~~~~~
raqm_glyph_t

please provide a full traceback and not a snippet without reasonable context.

It's a very long log file:
http://www.mediafire.com/file/osvwoluo8jgin0w/install.log/file

File a bug report with Pillow here:

1 Like

Hello everybody,

the problem doesn't seem to happen when I install Pillow in a virtualenv (I tried on FreeBSD 12.1 / python 3.8), but specifically when I use the Unified Installer. I tried with Python 3.7 and 3.8, changed versions to 6.2.2 and 7.0.0, but to no avail for the moment.

Laurent.

I have seen something similar lately and decided to move Pillow into my requierements.txt..this,happened also with some other packages...so likely unrelated to Pillow. Unfortunately I could not proceed with further investigations.

OK, I think I've found a workaround :slight_smile:

According to Github (sorry, links not allowed here), symbol raqm_glyph_t_01 appeared in file src/libImaging/raqm.h 2 years ago, in commit 55b029e.

The latest version of Pillow before that date is 4.2.1. Pinning that version in base_skeleton/release-5.2.1-versions.cfg allows the installer to complete the installation.

Once the install is completed, change to the buildout directory, edit file zeocluster/release-5.2.1-versions.cfg to restore the original pinning (6.2.1) and run bin/buildout.

The Plone install is now complete.

Hi @ldaverio, @notooth

I recently got the same error on FreeBSD 13 with Plone 5.2.7 on Python 2.7:

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/usr/home/rbartl/.virtualenvs/lims/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/usr/home/rbartl/.virtualenvs/lims/lib/python2.7/site-packages/zc/buildout/buildout.py", line 787, in install
    installed_files = self[part]._call(update)
  File "/usr/home/rbartl/.virtualenvs/lims/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1603, in _call
    return f()
  File "/usr/home/rbartl/develop/ridingbytes/lims/eggs/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 173, in update
    return self.install(update=True)
  File "/usr/home/rbartl/develop/ridingbytes/lims/eggs/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 155, in install
    installed.extend(self.install_scripts())
  File "/usr/home/rbartl/develop/ridingbytes/lims/eggs/plone.recipe.zope2instance-6.10.2-py2.7.egg/plone/recipe/zope2instance/recipe.py", line 949, in install_scripts
    requirements, ws = self.egg.working_set(["plone.recipe.zope2instance"])
  File "/usr/home/rbartl/develop/ridingbytes/lims/eggs/zc.recipe.egg-2.0.7-py2.7.egg/zc/recipe/egg/egg.py", line 87, in working_set
    allow_unknown_extras=bool_option(buildout_section, 'allow-unknown-extras')
  File "/usr/home/rbartl/develop/ridingbytes/lims/eggs/zc.recipe.egg-2.0.7-py2.7.egg/zc/recipe/egg/egg.py", line 168, in _working_set
    allow_unknown_extras=allow_unknown_extras)
  File "/usr/home/rbartl/.virtualenvs/ims/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 957, in install
    return installer.install(specs, working_set)
  File "/usr/home/rbartl/.virtualenvs/lims/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 730, in install
    for dist in self._get_dist(req, ws):
  File "/usr/home/rbartl/.virtualenvs/lims/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/usr/home/rbartl/.virtualenvs/lims/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack

The interesting part however is located before this traceback:

src/_imagingft.c:369:5: error: unknown type name 'raqm_glyph_t_01'; did you mean 'raqm_glyph_t'?                                                                          
    raqm_glyph_t_01 *glyphs_01 = NULL;
    ^~~~~~~~~~~~~~~
    raqm_glyph_t                                                                                                                                                          
/usr/local/include/raqm.h:98:3: note: 'raqm_glyph_t' declared here                                                                                                        
} raqm_glyph_t;
  ^
2 errors generated.                                                                                                                                                       
cc: error: no such file or directory: 'build/temp.freebsd-13.0-RELEASE-p11-amd64-2.7/src/_imagingft.o'
error: Setup script exited with error: command 'cc' failed with exit status 1

This means that the header file is taken from /usr/local/include/raqm.h, which means that you installed libraqm from the packages:

[root:~]# pkg search libraqm
libraqm-0.9.0                  Library that encapsulates complex text layout logic

Removing that library worked for me that it built the Pillow again in the buildout. It was a dependency of Calibre, which I do not use:

[root:~]# pkg remove libraqm
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 3 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        calibre: 5.40.0
        libraqm: 0.9.0
        py38-pillow: 9.0.1_1

Number of packages to be removed: 3

The operation will free 66 MiB.

Probably another way to fix it is to change the compiler flags accordingly?

Best regards
Ramon

Aah, very good point, thank you Ramon! :slight_smile:

Incidentally, I checked on my server, libraqm is an optional dependency of ImageMagick 7, itself a dependency of Gitlab. So, it could probably be removed by changing the options and recompiling ImageMagick.

Thanks again,
Laurent.