Opened 4 years ago

Closed 4 years ago

#60017 closed defect (fixed)

graphene @ meson.build:162:2: ERROR: Problem encountered: No aligned malloc function could be found.

Reported by: Cor0n4V1rus Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: git@…, ryandesign (Ryan Carsten Schmidt)
Port: graphene, meson

Description (last modified by ryandesign (Ryan Carsten Schmidt))

build fails, but works, if I run

port install graphene configure.compiler=macports-clang-7.0

after comparing the two main.log files, I noticed that, with clang-7, the configure process finds the function posix_memalign, while clang-9 does not and therefore does not proceed.

Attachments (2)

graphene-main.log (175.3 KB) - added by Cor0n4V1rus 4 years ago.
Build Log with clang-9
graphene-main-clang-7.0.log.gz (27.0 KB) - added by Cor0n4V1rus 4 years ago.
Build Log with clang-7

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by Cor0n4V1rus

Attachment: graphene-main.log added

Build Log with clang-9

Changed 4 years ago by Cor0n4V1rus

Build Log with clang-7

comment:1 Changed 4 years ago by kencu (Ken)

mmm. I thought I had fixed this once and for all. Will recheck what's going wrong...

comment:2 Changed 4 years ago by mf2k (Frank Schima)

Cc: dbevans removed
Owner: set to dbevans
Status: newassigned

comment:3 Changed 4 years ago by kencu (Ken)

works for me with macports-clang-9.0...

Build dir: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_graphene/graphene/work/build
Build type: native build
Project name: graphene
Project version: 1.8.6
Appending CFLAGS from environment: '-pipe -Os -std=c99 -arch x86_64'
Appending LDFLAGS from environment: ['-L/opt/local/lib', '-Wl,-headerpad_max_install_names', '-arch', 'x86_64']
Appending CPPFLAGS from environment: '-I/opt/local/include'
Appending CFLAGS from environment: '-pipe -Os -std=c99 -arch x86_64'
Appending LDFLAGS from environment: ['-L/opt/local/lib', '-Wl,-headerpad_max_install_names', '-arch', 'x86_64']
Appending CPPFLAGS from environment: '-I/opt/local/include'
C compiler for the host machine: /opt/local/bin/clang-mp-9.0 (clang 9.0.1 "clang version 9.0.1 ")
C linker for the host machine: APPLE ld 409.12
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -ffast-math: YES 
Compiler for C supports arguments -fstrict-aliasing: YES 
Compiler for C supports arguments -Wpointer-arith: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wnested-externs: YES 
Compiler for C supports arguments -Wold-style-definition: YES 
Compiler for C supports arguments -Wunused: YES 
Compiler for C supports arguments -Wmissing-noreturn: YES 
Compiler for C supports arguments -Wmissing-format-attribute: YES 
Compiler for C supports arguments -Wlogical-op: NO 
Compiler for C supports arguments -Wcast-align: YES 
Compiler for C supports arguments -Wno-unused-local-typedefs: YES 
Compiler for C supports arguments -Werror=float-conversion: YES 
Compiler for C supports arguments -Werror=redundant-decls: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=missing-declarations: YES 
Compiler for C supports arguments -Werror=format=2: YES 
Compiler for C supports arguments -Werror=uninitialized: YES 
Compiler for C supports arguments -Werror=shadow: YES 
Compiler for C supports arguments -Werror=implicit: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=main: YES 
Compiler for C supports arguments -Werror=missing-braces: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=array-bounds: YES 
Compiler for C supports arguments -Werror=write-strings: YES 
Compiler for C supports arguments -Werror=undef: YES 
Library m found: YES
Run-time dependency threads found: YES 
Has header "stdlib.h" : YES 
Has header "stdint.h" : YES 
Has header "stdbool.h" : YES 
Has header "memory.h" : YES 
Has header "pthread.h" with dependency threads: YES 
Checking for function "memalign" : NO 
Checking for function "_aligned_malloc" : NO 
Checking for function "aligned_alloc" : NO 
Checking for function "posix_memalign" : YES 
Checking for function "sincosf" with dependency -lm: NO 
Found pkg-config: /opt/local/bin/pkg-config (0.29.2)
Run-time dependency gobject-2.0 found: YES 2.58.3
Checking if "SSE intrinsics" compiles: YES 
Checking if "GCC vector intrinsics" compiles: NO 
Checking if "ARM NEON intrinsics" compiles: NO 
Configuring config.h using configuration
WARNING: Project targetting '>= 0.48.0' but tried to use feature introduced in '0.50.0': install arg in configure_file
Configuring graphene-config.h using configuration
Configuring graphene-version.h using configuration
WARNING: Already generated a pkg-config file for graphene-1.0
Found pkg-config: /opt/local/bin/pkg-config (0.29.2)
Build targets in project: 3
WARNING: Project specifies a minimum meson_version '>= 0.48.0' but uses features which were added in newer versions:
 * 0.50.0: {'install arg in configure_file'}

I am admittedly using my current hot-rod new linker ld64-409, but that appears irrelevant...

comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: git@… added
Description: modified (diff)
Port: meson added

I can't explain how it worked for Ken. It's a bug in meson. It will affect any project using meson's has_function and clang 8 or later. I've reported it here: https://github.com/mesonbuild/meson/issues/7204

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 in reply to:  3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kencu:

I am admittedly using my current hot-rod new linker ld64-409, but that appears irrelevant...

Well actually that probably is the reason. Your ld64 409 understands the -no_weak_imports flag that meson adds when using clang 8 or later; the ld64 127 that Snow Leopard users get by default doesn't.

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added

comment:7 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added

comment:8 Changed 4 years ago by kencu (Ken)

we gotta sort out how to bootstrap everyone to ld64-latest...projects like meson are just going to slam the door on these older os versions instead of fixing their scripts, and putting in hard os limits would be much worse for us, I think.

comment:9 Changed 4 years ago by kencu (Ken)

when meson tests for "clang 8", I wonder what they are really testing.

Probably Xcode8? That would make sense.

I would be surprised if they test for open source clang-7.0, 8.0, etc as that has absolutely nothing whatsoever to do with any Apple linker of course.

comment:10 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In a54674f7ce10c9c66ec26bd1c5a86b6c0ce82826/macports-ports (master):

meson: Don't use -Wl,-no_weak_imports on <= 10.6

Closes: #60017
Closes: #60308

Note: See TracTickets for help on using tickets.