all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Building mysql-workbench-community cannot find cairo.h
@ 2024-10-20 16:41 Simen Endsjø
  2024-10-21 18:36 ` Luis Felipe
  0 siblings, 1 reply; 2+ messages in thread
From: Simen Endsjø @ 2024-10-20 16:41 UTC (permalink / raw)
  To: help-guix

Hi, I need some help packaging mysql-workbench.

I'm using
https://git.sr.ht/~yewscion/yewscion-guix-channel/tree/trunk/item/cdr255/utils.scm#L985
as a base. That channel doesn't work, but it seems pretty complete although
maybe not 100% up to date.

I pushed my changes to a branch in case someone want to give it a go:
https://codeberg.org/simendsjo/dotfiles/src/branch/wip-mysql-package/sijo/packages/mysql.scm#L117

When trying to build this, I get an error:
        /tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/forms/swig/cairo.i:180: Error: Unable to find 'cairo/cairo.h'

The line in question is :
        %include <cairo/cairo.h>

The environment-variables file,
/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/environment-variables,
includes many libraries, including cairo:

        export C_INCLUDE_PATH=\
        "/gnu/store/hhyz3rnzkvif1qf0cpbssx2lwc7md7pb-cairo-1.18.0/include"

        export CMAKE_PREFIX_PATH=\
        "/gnu/store/hhyz3rnzkvif1qf0cpbssx2lwc7md7pb-cairo-1.18.0/"

        export CPLUS_INCLUDE_PATH=\
        "/gnu/store/hhyz3rnzkvif1qf0cpbssx2lwc7md7pb-cairo-1.18.0/include"

cairo.h is located at this path:
        /gnu/store/hhyz3rnzkvif1qf0cpbssx2lwc7md7pb-cairo-1.18.0/include/cairo/cairo.h

But maybe C_INCLUDE_PATH and CPLUS_INCLUDE_PATH is not used here?

I don't know CMake or much C, but maybe the CMakeLists.txt includes some
information? Here is some parts from the file which looks relevant.
/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/forms/swig/CMakeLists.txt:

    set(CMAKE_SWIG_FLAGS -w312)
    set_source_files_properties(cairo.i PROPERTIES CPLUSPLUS ON)
    set_property(SOURCE cairo.i PROPERTY SWIG_FLAGS -DCAIRO_HAS_PNG_FUNCTIONS=1 -fcompact -DSWIG_PYTHON_LEGACY_BOOL -I/usr/include)
    if(CMAKE_VERSION VERSION_LESS 3.8)
      swig_add_module(cairo python cairo.i)
    else()
      swig_add_library(cairo LANGUAGE python SOURCES cairo.i)
    endif()
    swig_link_libraries(cairo ${CAIRO_LIBRARIES})

    target_include_directories(_cairo
     SYSTEM
      PRIVATE
        ${PYTHON_INCLUDE_DIRS}
    )

    if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6))
      target_compile_options(_cairo PRIVATE -Wno-unused-but-set-variable)
    endif()
    if (GCC_VERSION)
      target_compile_options(_cairo PRIVATE -Wno-error)
    endif()

    target_compile_options(_cairo PRIVATE ${WB_CXXFLAGS})

Regards Simen

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Building mysql-workbench-community cannot find cairo.h
  2024-10-20 16:41 Building mysql-workbench-community cannot find cairo.h Simen Endsjø
@ 2024-10-21 18:36 ` Luis Felipe
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Felipe @ 2024-10-21 18:36 UTC (permalink / raw)
  To: Simen Endsjø, help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 2926 bytes --]

Hi Simen,

On 20/10/24 16:41, Simen Endsjø wrote:
> Hi, I need some help packaging mysql-workbench.
>
> I'm using
> https://git.sr.ht/~yewscion/yewscion-guix-channel/tree/trunk/item/cdr255/utils.scm#L985
> as a base. That channel doesn't work, but it seems pretty complete although
> maybe not 100% up to date.
>
> I pushed my changes to a branch in case someone want to give it a go:
> https://codeberg.org/simendsjo/dotfiles/src/branch/wip-mysql-package/sijo/packages/mysql.scm#L117
>
> When trying to build this, I get an error:
>          /tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/forms/swig/cairo.i:180: Error: Unable to find 'cairo/cairo.h'

I'm not familiar with building MySQL Workbench, but I get a different 
error while trying to build it from your branch:

#+begin_example
$ guix build -L . --cores=1 mysql-workbench-community

...
[ 47%] [mysql] Generating parser files...
cd 
/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/parsers/grammars 
&& /gnu/store/71aka05f0ldz2x3wf3491iz488qxgqk3-icedtea-2.6.13/bin/java 
-Xmx1024m -jar 
/gnu/store/zbzixk2v8vnc0i4xzg73q8f3lfm0ybw3-antlr4-4.10.1/share/java/antlr4.jar/antlr-4.13.2-complete.jar 
-Dlanguage=Cpp -listener -visitor -o ../mysql -package parsers 
/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/parsers/grammars/MySQLLexer.g4 
/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/parsers/grammars/MySQLParser.g4
Error: Unable to access jarfile 
/gnu/store/zbzixk2v8vnc0i4xzg73q8f3lfm0ybw3-antlr4-4.10.1/share/java/antlr4.jar/antlr-4.13.2-complete.jar
make[2]: *** 
[library/parsers/CMakeFiles/generate_parser_mysql.dir/build.make:90: 
/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/source/library/parsers/mysql/MySQLLexer.h] 
Error 1
make[2]: Leaving directory 
'/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/build'
make[1]: *** [CMakeFiles/Makefile2:1986: 
library/parsers/CMakeFiles/generate_parser_mysql.dir/all] Error 2
make[1]: Leaving directory 
'/tmp/guix-build-mysql-workbench-community-8.0.40-1.a7478f6.drv-0/build'
make: *** [Makefile:139: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "1") 
exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 980.0 seconds
command "make" "-j" "1" failed with status 2
build process 6 exited with status 256

#+end_example

I'm not using the channel you pointed to, though, only the mysql.scm 
module from your repository and the rest of the packages from the Guix 
channel.

Also, even though MySQL Workbench fails to build, the other packages in 
the module build correctly, look like free software and useful in their 
own, so maybe those can be contributed already to Guix?

Cheers,


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2881 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-21 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 16:41 Building mysql-workbench-community cannot find cairo.h Simen Endsjø
2024-10-21 18:36 ` Luis Felipe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.