supabase / postgres

Unmodified Postgres with some useful plugins

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playbook execution of the ansible/playbook-docker.yml playbook is unsuccessful

jimkoen opened this issue · comments

Bug report

Describe the bug

I am trying to successfully run the playbook-docker.yml playbook in accordance with the steps on your wiki page.

The playbook fails to properly execute however, this happens on multiple tasks:

1.) No package matching 'python' is available on Ubuntu 22.04

On a fresh Ubuntu 22.04 install on Hetzner, python is not a package in the apt repositories. This causes the Setup - install common dependencies task in ansible/tasks/docker/setup.yml to fail, which aborts the playbook run, with the following message:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'python' is available"}

I temporarily fixed this by removing python from the package list in the setup.yml tasks file. It would be appreciated to clarify if / how this package is necessary for the build.

2.) Building / compiling SFCGAL as part of the postgis extension produces build errors

On the same machine, after the previous fix, playbook execution fails again at the task postgis - build SFCGAL in ansible/tasks/postgres-extensions/01-postgis.yml.

Scanning the build output, there is only a single kind of error:

error: call of overloaded ‘CC_iterator(NULL)’ is ambiguous"

This error appears repeadeatly across what seems to be multiple files including the same header.

Examples:

"In file included from /tmp/SFCGAL-v1.3.10/src/../CGAL_patches/CGAL/corefinement_operations.h:30,",
        "                 from /tmp/SFCGAL-v1.3.10/src/algorithm/Intersection3D.cpp:26:",
        "/tmp/SFCGAL-v1.3.10/src/../CGAL_patches/CGAL/internal/corefinement/Combinatorial_map_output_builder.h:897:47: error: call of overloaded ‘CC_iterator(NULL)’ is ambiguous",
        "  897 |           .insert(std::make_pair(second_hedge,Dart_handle(NULL)));",
        "      |                                               ^~~~~~~~~~~~~~~~~",
        "In file included from /usr/include/CGAL/Triangulation_data_structure_2.h:33,",
        "                 from /usr/include/CGAL/Triangulation_2.h:32,",
        "                 from /usr/include/CGAL/Constrained_triangulation_2.h:25,",
        "                 from /usr/include/CGAL/Constrained_Delaunay_triangulation_2.h:20,",
        "                 from /tmp/SFCGAL-v1.3.10/src/../CGAL_patches/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h:31,",
        "                 from /tmp/SFCGAL-v1.3.10/src/algorithm/Intersection3D.cpp:25:",
        "/usr/include/CGAL/Compact_container.h:904:5: note: candidate: ‘CGAL::internal::CC_iterator<DSC, Const>::CC_iterator(std::nullptr_t) [with DSC = CGAL::Compact_container<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >, std::allocator<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> > >, CGAL::Default, CGAL::Default>; bool Const = false; std::nullptr_t = std::nullptr_t]’",
        "  904 |     CC_iterator (std::nullptr_t /*CGAL_assertion_code(n)*/)",
        "      |     ^~~~~~~~~~~",
        "/usr/include/CGAL/Compact_container.h:876:14: note: candidate: ‘CGAL::internal::CC_iterator<DSC, Const>::CC_iterator(CGAL::internal::CC_iterator<DSC, Const>::pointer) [with DSC = CGAL::Compact_container<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >, std::allocator<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> > >, CGAL::Default, CGAL::Default>; bool Const = false; CGAL::internal::CC_iterator<DSC, Const>::pointer = CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >*]’",
        "  876 |     explicit CC_iterator(pointer ptr) : m_ptr(ptr) { }",
        "      |              ^~~~~~~~~~~",
        "/usr/include/CGAL/Compact_container.h:853:9: note: candidate: ‘constexpr CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >, std::allocator<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> > >, CGAL::Default, CGAL::Default>, false>::CC_iterator(const CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >, std::allocator<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> > >, CGAL::Default, CGAL::Default>, false>&)’",
        "  853 |   class CC_iterator",
"In file included from /tmp/SFCGAL-v1.3.10/src/../CGAL_patches/CGAL/corefinement_operations.h:30,",
        "                 from /tmp/SFCGAL-v1.3.10/src/algorithm/Intersection3D.cpp:26:",
        "/tmp/SFCGAL-v1.3.10/src/../CGAL_patches/CGAL/internal/corefinement/Combinatorial_map_output_builder.h:900:59: error: call of overloaded ‘CC_iterator(NULL)’ is ambiguous",
        "  900 |           .insert(std::make_pair(second_hedge->opposite(),Dart_handle(NULL)));",
        "      |                                                           ^~~~~~~~~~~~~~~~~",
        "In file included from /usr/include/CGAL/Triangulation_data_structure_2.h:33,",
        "                 from /usr/include/CGAL/Triangulation_2.h:32,",
        "                 from /usr/include/CGAL/Constrained_triangulation_2.h:25,",
        "                 from /usr/include/CGAL/Constrained_Delaunay_triangulation_2.h:20,",
        "                 from /tmp/SFCGAL-v1.3.10/src/../CGAL_patches/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h:31,",
        "                 from /tmp/SFCGAL-v1.3.10/src/algorithm/Intersection3D.cpp:25:",
        "/usr/include/CGAL/Compact_container.h:904:5: note: candidate: ‘CGAL::internal::CC_iterator<DSC, Const>::CC_iterator(std::nullptr_t) [with DSC = CGAL::Compact_container<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >, std::allocator<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> > >, CGAL::Default, CGAL::Default>; bool Const = false; std::nullptr_t = std::nullptr_t]’",
        "  904 |     CC_iterator (std::nullptr_t /*CGAL_assertion_code(n)*/)",
        "      |     ^~~~~~~~~~~",
        "/usr/include/CGAL/Compact_container.h:876:14: note: candidate: ‘CGAL::internal::CC_iterator<DSC, Const>::CC_iterator(CGAL::internal::CC_iterator<DSC, Const>::pointer) [with DSC = CGAL::Compact_container<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >, std::allocator<CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> > >, CGAL::Default, CGAL::Default>; bool Const = false; CGAL::internal::CC_iterator<DSC, Const>::pointer = CGAL::Dart<3, CGAL::Combinatorial_map_storage_1<3, CGAL::internal_IOP::Item_with_points_and_volume_info<CGAL::Epeck, CGAL::Polyhedron_3<CGAL::Epeck, SFCGAL::detail::Items_with_mark_on_hedge> >, std::allocator<int>, CGAL::Boolean_tag<false> >, CGAL::Void, CGAL::Boolean_tag<false> >*]’",
        "  876 |     explicit CC_iterator(pointer ptr) : m_ptr(ptr) { }",

Forgive me for not posting the log output, but it seems that the entire build progess + gmake output on on all errors was logged.
This seems to be *very heavily templated code, which makes the error message several thousand lines long.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Get a fresh Install of x86 Ubuntu 22.04.1 LTS
  2. Install Ansible according to the official guide
  3. Clone the supabase/postgres repo
  4. Execute the ansible/playbook-docker.yml playbook via ./../../.local/bin/ansible-playbook playbook-docker.yml (your ansible install may be elsewhere, I was too lazy to add it to my $PATH)
  5. Watch error Nr. 1 unfold (no package named 'python' in the apt repos)
  6. Comment out the - python list entry from the 'Setup - install common dependencies' apt module invocation.
  7. Execute the playbook again, watch the build error Nr. 2 unfold (SFCGAL compilation fails)

Expected behavior

The playbook finishes task execution succesfully and I obtain a docker container image to use.

Screenshots

None.

System information

  • OS: Fresh x86 Ubuntu 22.04.1 LTS (Hetzner Cloud Image),
  • Platform: A Hetzner CX11 vServer instance
  • Ansible version:
> $ ./~/.local/bin/ansible --version
ansible [core 2.13.4]
  config file = /root/postgres/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = ./../../.local/bin/ansible
  python version = 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0]
  jinja version = 3.0.3
  libyaml = True
  • Version of supabase/postgres: latest checkout from branch develop
  • Python version:
> $ python3 --version
Python 3.10.6

Additional context

Likely related issue: #240

I solved the issue, see my comment #240 (comment)