Opened 4 years ago

Closed 4 years ago

#60946 closed defect (worksforme)

gnuradio-companion build failure, Cairo not found

Reported by: d0plr Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc:
Port:

Description

Using MacOS 10.14.6, MacPorts 2.6.3

Here's a extract of the log file:

-- 
-- Python checking for python2 >= 2.7.6 or python3 >= 3.6.5 - found
-- Python checking for PyYAML >= 3.10 - found
-- Python checking for mako >= 0.9.1 - found
-- Python checking for pygobject >= 2.28.6 - found
-- Python checking for Gtk (GI) >= 3.10.8 - found
-- Python checking for Cairo (GI) >= 1.0 - not found
-- Python checking for PangoCairo (GI) >= 1.0 - found
-- Python checking for numpy - found
-- 
-- Configuring gnuradio-companion support...
--   Dependency ENABLE_GNURADIO_RUNTIME = ON
--   Dependency ENABLE_PYTHON = ON
--   Dependency PYTHON_MIN_VER_FOUND = TRUE
--   Dependency PYYAML_FOUND = TRUE
--   Dependency MAKO_FOUND = TRUE
--   Dependency PYGI_FOUND = TRUE
--   Dependency GTK_GI_FOUND = TRUE
--   Dependency CAIRO_GI_FOUND = FALSE
--   Dependency PANGOCAIRO_GI_FOUND = TRUE
--   Dependency NUMPY_FOUND = TRUE
CMake Error at cmake/Modules/GrComponent.cmake:75 (message):
  user force-enabled gnuradio-companion but configuration checked failed
Call Stack (most recent call first):
  grc/CMakeLists.txt:95 (GR_REGISTER_COMPONENT)
-- Configuring incomplete, errors occurred!

so it seems that the Cairo check is failing, although I do have cairo, py27-cairo and py37-cairo installed.

Attachments (1)

gnuradio.log (449.4 KB) - added by d0plr 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by michaelld (Michael Dickens)

OK. which version of Python is selected to use? Substitute the version for "X.Y" below:

What does the following return:

pythonX.Y -c "import gi; gi.require_foreign('cairo', 'Context')"

Can you please also do the following:

sudo port clean gnuradio
sudo port install gnuradio

and then if/when it fails please post the whole build log ... sometimes there is useful info elsewhere in the log.

comment:2 Changed 4 years ago by michaelld (Michael Dickens)

Owner: set to michaelld
Status: newassigned

Changed 4 years ago by d0plr

Attachment: gnuradio.log added

comment:3 Changed 4 years ago by d0plr

Hello,

I used the default variants of gnuradio, so python37 should be selected.

$ python3.7 -c "import gi; gi.require_foreign('cairo', 'Context')"
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gi/__init__.py", line 179, in require_foreign
    _gi.require_foreign(namespace, symbol)
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gi/__init__.py", line 181, in require_foreign
    raise ImportError(str(e))
ImportError: Couldn't find foreign struct converter for 'cairo.Context'

I attached the full build log. Thanks !

comment:4 Changed 4 years ago by d0plr

OK I see I have some packages installed with the -x11 +quartz variants, others with "+x11". Trying to rebuild everything with "-x11 +quartz" right now.

comment:5 Changed 4 years ago by michaelld (Michael Dickens)

good idea!

comment:6 Changed 4 years ago by d0plr

OK, I rebuild a bunch of packages :

  cairo @1.16.0_0+quartz (active)
  glib2 @2.58.3_0+quartz (active)
  gtk2 @2.24.32_0+quartz (active)
  gtk3 @3.24.21_0+quartz (active)
  libglade2 @2.6.4_8+quartz (active)
  pango @1.42.4_2+quartz (active)
  py27-gobject @2.28.7_0+quartz (active)
  py27-pygtk @2.24.0_3+quartz (active)

But I still get:

$ python3.7 -c "import gi; gi.require_foreign('cairo', 'Context')"
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gi/__init__.py", line 179, in require_foreign
    _gi.require_foreign(namespace, symbol)
TypeError: Couldn't find foreign struct converter for 'cairo.Context'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/gi/__init__.py", line 181, in require_foreign
    raise ImportError(str(e))
ImportError: Couldn't find foreign struct converter for 'cairo.Context'

Any idea what I missed ?

comment:7 Changed 4 years ago by michaelld (Michael Dickens)

Was one of the ports you rebuilt cairo? If not, try a force uninstall and then install it as +quartz & see if that fixes the issue.

comment:8 Changed 4 years ago by d0plr

Found the culprit: I forgot to rebuild py37-cairo with +quartz gnuradio now builds fine, thanks !

comment:9 Changed 4 years ago by michaelld (Michael Dickens)

Resolution: worksforme
Status: assignedclosed

Well done! Thx for reporting back.

Note: See TracTickets for help on using tickets.