Skip to content

Error when building TSRM in ARM64 #11188

Closed

Description

@AndrewKusov

Description

When building in ARM64 with the --enable-zts flag, I get an error similar to the one described in this bug report - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266175. Please make corrections for TSRM for this architecture, they are already available on the website

PHP Version

PHP 8.2.5

Operating System

No response

Activity

  1. iluuu1994 commented on May 7, 2023

    @iluuu1994
    Member

    @AndrewKusov Can you provide your ./configure flags and the full error message? We have an ARM build with --enable-zts so that alone seems not to be enough for reproducing the problem.

    Edit: On, this is FreeBSD. We only have a x86 build here. Still, the full error would be good.

  2. ndossche commented on May 11, 2023

    @ndossche
    Member

    I can reproduce this in an AArch64 emulator running FreeBSD.

    Full error:

    --- libphp.la ---
    ld: error: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against _tsrm_ls_cache cannot be used with -shared
    >>> defined in Zend/.libs/zend.o
    >>> referenced by TSRM.c:788 (TSRM/TSRM.c:788)
    >>>               TSRM/.libs/TSRM.o:(tsrm_get_ls_cache_tcb_offset)
    
    ld: error: relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC against _tsrm_ls_cache cannot be used with -shared
    >>> defined in Zend/.libs/zend.o
    >>> referenced by TSRM.c:788 (TSRM/TSRM.c:788)
    >>>               TSRM/.libs/TSRM.o:(tsrm_get_ls_cache_tcb_offset)
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    *** [libphp.la] Error code 1
    
    

    Used this configure line: ./configure --disable-all --enable-debug --enable-opcache --enable-zts --with-libxml --disable-phpdbg --enable-embed.

    The proposed fix in the linked thread is not good however, it just disables the JIT and ifdefs the offending code.

    Note: I have a dev setup where I can take a look at this soon-ish

  3. self-assigned this
    on May 12, 2023
  4. 1 remaining item

  5. added 5 commits that reference this issue on Jun 3, 2024
    3e87521
    face2ab
    644d362
    e438ca5
    89c4e4c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions