Opened 19 months ago

Last modified 19 months ago

#67366 assigned defect

libmamba fails to build on PPC: context.hpp: error: Unknown OSX platform

Reported by: barracuda156 Owned by: l2dy (Zero King)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: powerpc Cc:
Port: libmamba

Description

[ 23%] Building CXX object libmamba/CMakeFiles/libmamba.dir/src/version.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/build/libmamba && /opt/local/bin/g++-mp-12 -DFMT_SHARED -DLIBMAMBA_EXPORTS -DSPDLOG_FMT_EXTERNAL -Dlibmamba_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src -isystem /opt/local/include -isystem /opt/local/share -isystem /opt/local/include/libfmt9 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -Wall -std=gnu++17 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT libmamba/CMakeFiles/libmamba.dir/src/core/environment.cpp.o -MF CMakeFiles/libmamba.dir/src/core/environment.cpp.o.d -o CMakeFiles/libmamba.dir/src/core/environment.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/environment.cpp
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/build/libmamba && /opt/local/bin/g++-mp-12 -DFMT_SHARED -DLIBMAMBA_EXPORTS -DSPDLOG_FMT_EXTERNAL -Dlibmamba_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src -isystem /opt/local/include -isystem /opt/local/share -isystem /opt/local/include/libfmt9 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -Wall -std=gnu++17 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT libmamba/CMakeFiles/libmamba.dir/src/version.cpp.o -MF CMakeFiles/libmamba.dir/src/version.cpp.o.d -o CMakeFiles/libmamba.dir/src/version.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/version.cpp
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/context.cpp:12:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:68:2: error: #error "Unknown OSX platform"
   68 | #error "Unknown OSX platform"
      |  ^~~~~
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/activation.cpp:8:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:68:2: error: #error "Unknown OSX platform"
   68 | #error "Unknown OSX platform"
      |  ^~~~~
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/channel.cpp:18:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:68:2: error: #error "Unknown OSX platform"
   68 | #error "Unknown OSX platform"
      |  ^~~~~
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/api/configuration.hpp:10,
                 from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/singletons.cpp:14:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:68:2: error: #error "Unknown OSX platform"
   68 | #error "Unknown OSX platform"
      |  ^~~~~
[ 24%] Building CXX object libmamba/CMakeFiles/libmamba.dir/src/core/environments_manager.cpp.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/build/libmamba && /opt/local/bin/g++-mp-12 -DFMT_SHARED -DLIBMAMBA_EXPORTS -DSPDLOG_FMT_EXTERNAL -Dlibmamba_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src -isystem /opt/local/include -isystem /opt/local/share -isystem /opt/local/include/libfmt9 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -Wall -std=gnu++17 -arch ppc -mmacosx-version-min=10.6 -fPIC -MD -MT libmamba/CMakeFiles/libmamba.dir/src/core/environments_manager.cpp.o -MF CMakeFiles/libmamba.dir/src/core/environments_manager.cpp.o.d -o CMakeFiles/libmamba.dir/src/core/environments_manager.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/environments_manager.cpp
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/src/core/environments_manager.cpp:10:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:68:2: error: #error "Unknown OSX platform"
   68 | #error "Unknown OSX platform"
      |  ^~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:214:37: error: 'MAMBA_PLATFORM' was not declared in this scope
  214 |         std::string host_platform = MAMBA_PLATFORM;
      |                                     ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:214:37: error: 'MAMBA_PLATFORM' was not declared in this scope
  214 |         std::string host_platform = MAMBA_PLATFORM;
      |                                     ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:215:32: error: 'MAMBA_PLATFORM' was not declared in this scope
  215 |         std::string platform = MAMBA_PLATFORM;
      |                                ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:214:37: error: 'MAMBA_PLATFORM' was not declared in this scope
  214 |         std::string host_platform = MAMBA_PLATFORM;
      |                                     ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:215:32: error: 'MAMBA_PLATFORM' was not declared in this scope
  215 |         std::string platform = MAMBA_PLATFORM;
      |                                ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:215:32: error: 'MAMBA_PLATFORM' was not declared in this scope
  215 |         std::string platform = MAMBA_PLATFORM;
      |                                ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:214:37: error: 'MAMBA_PLATFORM' was not declared in this scope
  214 |         std::string host_platform = MAMBA_PLATFORM;
      |                                     ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:215:32: error: 'MAMBA_PLATFORM' was not declared in this scope
  215 |         std::string platform = MAMBA_PLATFORM;
      |                                ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:214:37: error: 'MAMBA_PLATFORM' was not declared in this scope
  214 |         std::string host_platform = MAMBA_PLATFORM;
      |                                     ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libmamba/libmamba/work/mamba-2022.11.25/libmamba/include/mamba/core/context.hpp:215:32: error: 'MAMBA_PLATFORM' was not declared in this scope
  215 |         std::string platform = MAMBA_PLATFORM;
      |                                ^~~~~~~~~~~~~~

Change History (3)

comment:1 Changed 19 months ago by barracuda156

Well, that is trivially fixable, though I am not sure if it gonna work in result :)

  1. S. Does this in link.cpp needs a case for PPC?
    #if defined(__APPLE__)
                        binary_changed = true;
    #endif
                        std::size_t end = pos + path_data.prefix_placeholder.size();
                        std::string suffix;
    
                        while (end < buffer.size() && buffer[end] != '\0')
                        {
                            suffix += buffer[end];
                            ++end;
                        }
    
                        std::string replacement = concat(new_prefix, suffix, padding);
                        buffer.replace(pos, end - pos, replacement);
    
                        pos = buffer.find(path_data.prefix_placeholder, pos + new_prefix.size());
                    }
    #endif
                }
    
                std::ofstream fo = open_ofstream(dst, std::ios::out | std::ios::binary);
                fo << buffer;
                fo.close();
    
                std::error_code lec;
                fs::permissions(dst, fs::status(src).permissions(), lec);
                if (lec)
                {
                    LOG_WARNING << "Could not set permissions on [" << dst << "]: " << ec.message();
                }
    
    #if defined(__APPLE__)
                if (binary_changed && m_pkg_info.subdir == "osx-arm64")
                {
                    codesign(dst, Context::instance().output_params.verbosity > 1);
                }
    #endif
    

comment:2 Changed 19 months ago by l2dy (Zero King)

I don't think upstream intends to support PowerPC Macs. Does any Conda channel support this architecture?

comment:3 in reply to:  2 Changed 19 months ago by barracuda156

Replying to l2dy:

I don't think upstream intends to support PowerPC Macs. Does any Conda channel support this architecture?

No idea, I did not use it. If it is capable of building packages from source, then it makes sense. If not, then, arguably, there is no point.

  1. S. In case 1 I can make a PR to upstream. In case 2 the port should be restricted to exclude ppc/ppc64.
Last edited 19 months ago by barracuda156 (previous) (diff)
Note: See TracTickets for help on using tickets.