Building for iOS: requested alignment must be 536870912 bytes or smaller

168 views
Skip to first unread message

Richard

unread,
May 3, 2021, 8:20:35 AM5/3/21
to v8-users
I'm getting this error when building for iOS:

In file included from ../../v8/v8/src/builtins/builtins-async-iterator-gen.cc:11:
In file included from ../../v8/v8/src/execution/frames-inl.h:13:
In file included from ../../v8/v8/src/objects/objects-inl.h:21:
In file included from ../../v8/v8/src/heap/heap-write-barrier-inl.h:15:
In file included from ../../v8/v8/src/objects/compressed-slots-inl.h:10:
../../v8/v8/src/common/ptr-compr-inl.h:25:35: error: requested alignment must be 536870912 bytes or smaller; maximum alignment assumed [-Werror,-Wbuiltin-assume-aligned-alignment]
  ret = reinterpret_cast<Address>(V8_ASSUME_ALIGNED(
                                  ^~~~~~~~~~~~~~~~~~
../../v8/v8/include/v8config.h:388:3: note: expanded from macro 'V8_ASSUME_ALIGNED'
  __builtin_assume_aligned((ptr), (alignment))
  ^                               ~~~~~~~~~~~
1 error generated.

My build settings are:

enable_ios_bitcode = true
ios_deployment_target = 10
is_component_build = false
is_debug = false
target_cpu = "arm64"
target_os = "ios"
use_custom_libcxx = false
use_xcode_clang = true
v8_enable_i18n_support = false
v8_monolithic = true
v8_use_external_startup_data = false

Any ideas how to fix this?

Jakob Gruber

unread,
May 4, 2021, 1:30:20 AM5/4/21
to v8-u...@googlegroups.com
Try turning off pointer compression: https://source.chromium.org/chromium/chromium/src/+/main:v8/BUILD.gn;l=121;drc=f98f496f9e5e9faea58e1de737d9d46e2248b337

Let us know if it works, we should update the iOS instructions page if so.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/07a36602-b2f1-4771-a061-5ef359d3a16dn%40googlegroups.com.

Clemens Backes

unread,
May 4, 2021, 3:40:38 AM5/4/21
to v8-u...@googlegroups.com
Alternatively, remove that use of V8_ASSUME_ALIGNED. It's just a hint for the compiler, it's not needed for correctness.



--

Clemens Backes

Software Engineer

clem...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.


This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Richard

unread,
May 4, 2021, 11:17:21 AM5/4/21
to v8-users
It looks like that fixed it. There are some general build errors now, but if they pose a problem, I'll post again.

Thanks!

Richard

unread,
May 4, 2021, 11:17:50 AM5/4/21
to v8-users
Turning off pointer compression was the solution...

Jakob Gruber

unread,
May 5, 2021, 1:10:28 AM5/5/21
to v8-u...@googlegroups.com
Updating instructions here https://github.com/v8/v8.dev/pull/549 (feel free to create pull requests yourself if you have addtl improvements).

Reply all
Reply to author
Forward
0 new messages