Opened 22 months ago

Last modified 22 months ago

#66759 new defect

meson on 10.6.8 Rosetta has arch issues: built for ppc7400 which is not the architecture being linked (x86_64)

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: snowleopard, rosetta Cc:
Port: meson

Description

Perhaps not of crucial importance, but tests set-up is wrong, at least on old systems.

  1. Rosetta builds for wrong arch, possibly because gcc-4.2 is picked and not a new GCC:
    -----
    Running test binary command:  /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/sanitycheckc.exe
    C compiler for the build machine: /usr/bin/gcc-4.2 (gcc 4.2.1 "i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)")
    C linker for the build machine: /usr/bin/gcc-4.2 ld64 97.17
    detecting CPU family based on trial='power macintosh'
    detecting CPU family based on trial='power macintosh'
    Build machine cpu family: ppc
    Build machine cpu: power macintosh
    Host machine cpu family: ppc
    Host machine cpu: power macintosh
    Target machine cpu family: ppc
    Target machine cpu: power macintosh
    detecting CPU family based on trial='power macintosh'
    Running compile:
    Working directory:  /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/tmp5xgu41zo
    Command line:  /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/tmp5xgu41zo/testfile.c -o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/tmp5xgu41zo/output.exe -O0 
    
    Code:
     #include<stdio.h>
            
            int main(void) {
                printf("%ld\n", (long)(sizeof(void *)));
                return 0;
            }
    Compiler stdout:
     
    Compiler stderr:
     
    Program stdout:
    
    8
    
    Program stderr:
    
    
    Running compile:
    Working directory:  /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/tmp4v864641
    Command line:  /usr/bin/gcc-4.2 /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/tmp4v864641/testfile.c -o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/meson-1.0.0/tmpuuhh26b_/meson-private/tmp4v864641/output.obj -c -O0 --print-search-dirs 
    
    Code:
     
    Compiler stdout:
     install: /usr/lib/gcc/i686-apple-darwin10/4.2.1/
    programs: =/usr/libexec/gcc/i686-apple-darwin10/4.2.1/:/usr/libexec/gcc/i686-apple-darwin10/4.2.1/:/usr/libexec/gcc/i686-apple-darwin10/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/:/usr/libexec/gcc/i686-apple-darwin10/4.2.1/:/usr/libexec/gcc/i686-apple-darwin10/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/bin/i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/bin/
    libraries: =/lib/i686-apple-darwin10/4.2.1/x86_64/:/lib/x86_64/:/usr/lib/i686-apple-darwin10/4.2.1/x86_64/:/usr/lib/x86_64/:/opt/local/lib/i686-apple-darwin10/4.2.1/x86_64/:/opt/local/lib/x86_64/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/i686-apple-darwin10/4.2.1/x86_64/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/x86_64/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1/x86_64/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../x86_64/:/lib/i686-apple-darwin10/4.2.1/:/lib/:/usr/lib/i686-apple-darwin10/4.2.1/:/usr/lib/:/opt/local/lib/i686-apple-darwin10/4.2.1/:/opt/local/lib/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../../i686-apple-darwin10/lib/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1/:/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../
    
    Compiler stderr:
     
    Rejected /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_meson/meson/work/.tmp/tmpponctnjw/libalexandria.dylib, supports ['x86_64'] but need ppc
    
    test cases/unit/17 prebuilt shared/meson.build:9:0: ERROR: C shared or static library 'alexandria' not found
    
    Found ninja-1.11.1 at /opt/local/bin/ninja
    [1/9] Compiling C object subdir/gir/girprog.p/prog.c.o
    [2/9] Compiling C object statichelper/libstatichelper.a.p/meson-sample.c.o
    [3/9] Compiling C object subdir/gir/libgirlib.dylib.p/meson-subsample.c.o
    [4/9] Linking static target statichelper/libstatichelper.a
    [5/9] Linking target subdir/gir/libgirlib.dylib
    FAILED: subdir/gir/libgirlib.dylib 
    /usr/bin/gcc-4.2  -o subdir/gir/libgirlib.dylib subdir/gir/libgirlib.dylib.p/meson-subsample.c.o -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-undefined,error -shared -install_name @rpath/libgirlib.dylib -Wl,-headerpad_max_install_names -Os statichelper/libstatichelper.a /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib
    ld: warning: in /opt/local/lib/libgobject-2.0.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
    ld: warning: in /opt/local/lib/libglib-2.0.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
    ld: warning: in /opt/local/lib/libintl.dylib, file was built for ppc7400 which is not the architecture being linked (x86_64)
    Undefined symbols:
      "_g_value_set_string", referenced from:
          _meson_sub_sample_get_property in meson-subsample.c.o
          _meson_sample_get_property in libstatichelper.a(meson-sample.c.o)
      "_g_once_init_enter", referenced from:
          _meson_sub_sample_get_type in meson-subsample.c.o
          _meson_sample_get_type in libstatichelper.a(meson-sample.c.o)
      "_g_return_if_fail_warning", referenced from:
          _meson_sub_sample_new in meson-subsample.c.o
          _meson_sub_sample_print_message in meson-subsample.c.o
          _meson_sample_new in libstatichelper.a(meson-sample.c.o)
          _meson_sample_print_message in libstatichelper.a(meson-sample.c.o)
      "_g_object_new", referenced from:
          _meson_sub_sample_new in meson-subsample.c.o
          _meson_sample_new in libstatichelper.a(meson-sample.c.o)
      "_g_atomic_pointer_get", referenced from:
          _meson_sub_sample_get_type in meson-subsample.c.o
          _meson_sample_get_type in libstatichelper.a(meson-sample.c.o)
      "_g_type_class_adjust_private_offset", referenced from:
          _meson_sub_sample_class_intern_init in meson-subsample.c.o
          _meson_sample_class_intern_init in libstatichelper.a(meson-sample.c.o)
      "_g_object_class_install_properties", referenced from:
          _meson_sub_sample_class_intern_init in meson-subsample.c.o
          _meson_sample_class_intern_init in libstatichelper.a(meson-sample.c.o)
      "_g_type_check_instance_is_a", referenced from:
          _meson_sub_sample_print_message in meson-subsample.c.o
          _meson_sample_print_message in libstatichelper.a(meson-sample.c.o)
      "_g_free", referenced from:
          _meson_sub_sample_finalize in meson-subsample.c.o
          _meson_sample_finalize in libstatichelper.a(meson-sample.c.o)
      "_g_type_class_peek_parent", referenced from:
          _meson_sub_sample_class_intern_init in meson-subsample.c.o
          _meson_sample_class_intern_init in libstatichelper.a(meson-sample.c.o)
      "_g_type_check_class_cast", referenced from:
          _meson_sub_sample_finalize in meson-subsample.c.o
          _meson_sub_sample_class_intern_init in meson-subsample.c.o
          _meson_sample_class_intern_init in libstatichelper.a(meson-sample.c.o)
          _meson_sample_finalize in libstatichelper.a(meson-sample.c.o)
      "_g_param_spec_string", referenced from:
          _meson_sub_sample_class_intern_init in meson-subsample.c.o
          _meson_sample_class_intern_init in libstatichelper.a(meson-sample.c.o)
      "_g_type_add_instance_private", referenced from:
          _meson_sample_get_type_once in libstatichelper.a(meson-sample.c.o)
      "_g_log", referenced from:
          _meson_sub_sample_get_property in meson-subsample.c.o
          _meson_sub_sample_set_property in meson-subsample.c.o
          _meson_sample_get_property in libstatichelper.a(meson-sample.c.o)
          _meson_sample_set_property in libstatichelper.a(meson-sample.c.o)
      "_g_type_register_static_simple", referenced from:
          _meson_sub_sample_get_type_once in meson-subsample.c.o
          _meson_sample_get_type_once in libstatichelper.a(meson-sample.c.o)
      "_g_intern_static_string", referenced from:
          _meson_sub_sample_get_type_once in meson-subsample.c.o
          _meson_sample_get_type_once in libstatichelper.a(meson-sample.c.o)
      "_g_type_check_instance_cast", referenced from:
          _meson_sub_sample_get_property in meson-subsample.c.o
          _meson_sub_sample_set_property in meson-subsample.c.o
      "_g_print", referenced from:
          _meson_sub_sample_print_message in meson-subsample.c.o
          _meson_sample_print_message in libstatichelper.a(meson-sample.c.o)
      "_g_once_init_leave", referenced from:
          _meson_sub_sample_get_type in meson-subsample.c.o
          _meson_sample_get_type in libstatichelper.a(meson-sample.c.o)
      "_g_type_name", referenced from:
          _meson_sub_sample_get_property in meson-subsample.c.o
          _meson_sub_sample_get_property in meson-subsample.c.o
          _meson_sub_sample_set_property in meson-subsample.c.o
          _meson_sub_sample_set_property in meson-subsample.c.o
          _meson_sample_get_property in libstatichelper.a(meson-sample.c.o)
          _meson_sample_get_property in libstatichelper.a(meson-sample.c.o)
          _meson_sample_set_property in libstatichelper.a(meson-sample.c.o)
          _meson_sample_set_property in libstatichelper.a(meson-sample.c.o)
      "_g_value_dup_string", referenced from:
          _meson_sub_sample_set_property in meson-subsample.c.o
          _meson_sample_set_property in libstatichelper.a(meson-sample.c.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    
  1. Some tests use python3 in env, of course does not get found.
  1. Boost is not detected.

Change History (2)

comment:1 Changed 22 months ago by kencu (Ken)

I wrote up all the testing code in meson and fixed it (last time I fixed it) to work properly on every system I tried.

The python3 is already being reinplaced to the specific selected python here:

https://github.com/macports/macports-ports/blob/9ee781a2cedac965098b7a5e05e00d01f9d6e1d7/devel/meson/Portfile#L143

so this was fixed. Perhaps a few new source files need that done?

The correct arch for the testing is all set up properly here, and worked just right last time I wrote it / tested it:

https://github.com/macports/macports-ports/blob/9ee781a2cedac965098b7a5e05e00d01f9d6e1d7/devel/meson/Portfile#L150

but admittedly I don't use Rosetta on 10.6.8 for anything, and don't use 10.6-for-PPC for anything either, so there could be some weird thing happening with those odd systems.

I don't think it has anything specifically to do with gcc-4.2.

comment:2 Changed 22 months ago by kencu (Ken)

Keywords: powerpc leopard removed
Summary: meson tests issues: on Rosetta dylibs built for wrong arch; old gcc picked; cannot find Boostmeson on 10.6.8 Rosetta has arch issues: built for ppc7400 which is not the architecture being linked (x86_64)
Note: See TracTickets for help on using tickets.