dunglas / frankenphp

🧟 The modern PHP app server
https://frankenphp.dev
MIT License
6.88k stars 235 forks source link

FreeBSD "fatal error: invalid function symbol table" when executing #749

Open arcanumbridge opened 6 months ago

arcanumbridge commented 6 months ago

What happened?

I'm getting the following error while trying to run frankenphp on FreeBSD 14.0 amd64/x86_64. I've built PHP with the flags for linux listed in compile.md and have used xcaddy to build the frankenphp binary.

# ./frankenphp 
runtime: pcHeader: magic= 0xfffffff1 pad1= 0 pad2= 0 minLC= 1 ptrSize= 8 pcHeader.textStart= 0x1769060 text= 0x23b55e445060 pluginpath= 
fatal error: invalid function symbol table
runtime: panic before malloc heap initialized

runtime stack:
runtime.throw({0x23b55d20f517?, 0x300307465?})
    /home/amistry/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.freebsd-amd64/src/runtime/panic.go:1023 +0x5c fp=0x23bd80396c90 sp=0x23bd80396c60 pc=0x23b55e48259c
runtime.moduledataverify1(0x23b55f9c5ea0?)
    /home/amistry/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.freebsd-amd64/src/runtime/symtab.go:532 +0x816 fp=0x23bd80396db0 sp=0x23bd80396c90 pc=0x23b55e4a2f36
runtime.moduledataverify(...)
    /home/amistry/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.freebsd-amd64/src/runtime/symtab.go:518
runtime.schedinit()
    /home/amistry/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.freebsd-amd64/src/runtime/proc.go:783 +0x58 fp=0x23bd80396df0 sp=0x23bd80396db0 pc=0x23b55e486e58
runtime.rt0_go()
    /home/amistry/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.freebsd-amd64/src/runtime/asm_amd64.s:349 +0x11c fp=0x23bd80396df8 sp=0x23bd80396df0 pc=0x23b55e4bb9bc

# ldd frankenphp 
frankenphp:
    libelf.so.1 => /usr/local/lib/libelf.so.1 (0x39b9c9f6a000)
    libcrypt.so.5 => /lib/libcrypt.so.5 (0x39b9c9579000)
    libutil.so.9 => /lib/libutil.so.9 (0x39b9caaf2000)
    libm.so.5 => /lib/libm.so.5 (0x39b9cf0ee000)
    libthr.so.3 => /lib/libthr.so.3 (0x39b9d00fe000)
    libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0x39b9d0746000)
    libssl.so.12 => /usr/local/lib/libssl.so.12 (0x39b9d0bfd000)
    libcrypto.so.12 => /usr/local/lib/libcrypto.so.12 (0x39b9d1293000)
    libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x39b9d3567000)
    libargon2.so.0 => /usr/local/lib/libargon2.so.0 (0x39b9d21a4000)
    libz.so.6 => /lib/libz.so.6 (0x39b9d26b8000)
    libbrotlicommon.so.1 => /usr/local/lib/libbrotlicommon.so.1 (0x39b9d43c6000)
    libbrotlidec.so.1 => /usr/local/lib/libbrotlidec.so.1 (0x39b9d53d7000)
    libbrotlienc.so.1 => /usr/local/lib/libbrotlienc.so.1 (0x39b9d5afb000)
    libphp.so => /usr/local/lib/libphp.so (0x39b9d6ea1000)
    libdl.so.1 => /usr/lib/libdl.so.1 (0x39b9d681f000)
    libc.so.7 => /lib/libc.so.7 (0x39b9d7f5a000)
    libargp.so.0 => /usr/local/lib/libargp.so.0 (0x39b9d931b000)
    libintl.so.8 => /usr/local/lib/libintl.so.8 (0x39b9d9bbb000)
    liblzma.so.5 => /usr/lib/liblzma.so.5 (0x39b9da69e000)
    librt.so.1 => /lib/librt.so.1 (0x39b9daba8000)
    libmd.so.6 => /lib/libmd.so.6 (0x39b9dacbf000)
    [vdso] (0x39b9c8b85000)

Build Type

Custom (tell us more in the description)

Worker Mode

No

Operating System

Other (tell us more in the description)

CPU Architecture

x86_64

PHP configuration

phpinfo()
PHP Version => 8.2.18

System => FreeBSD bigguy.am-productions.biz 14.0-RELEASE-p4 FreeBSD 14.0-RELEASE-p4 #13 4edf3b807: Thu Dec 28 22:04:05 EST 2023     amistry@bigguy.am-productions.biz:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
Build Date => Apr 25 2024 22:41:49
Build System => FreeBSD bigguy.am-productions.biz 14.0-RELEASE-p4 FreeBSD 14.0-RELEASE-p4 #13 4edf3b807: Thu Dec 28 22:04:05 EST 2023 amistry@bigguy.am-productions.biz:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
Configure Command =>  './configure'  '--disable-all' '--program-prefix=' '--with-config-file-scan-dir=/usr/local/etc/php' '--with-layout=GNU' '--with-libxml' '--with-openssl' '--with-password-argon2=/usr/local' '--disable-cgi' '--enable-dtrace' '--enable-embed' '--disable-zend-signals' '--enable-zend-max-execution-timers' '--enable-mysqlnd' '--with-external-pcre=/usr/local' '--enable-zts' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/share/man' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/usr/ports/lang/php82/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig' 'CFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ' 'CPP=cpp' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include ' 'OPENSSL_CFLAGS=-I/usr/local/include' 'OPENSSL_LIBS=-L/usr/local/lib -lssl -lcrypto'
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php
Additional .ini files parsed => (none)
PHP API => 20220829
PHP Extension => 20220829
Zend Extension => 420220829
Zend Extension Build => API420220829,TS
PHP Extension Build => API20220829,TS
Debug Build => no
Thread Safety => enabled
Thread API => POSIX Threads
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
Zend Max Execution Timers => disabled
IPv6 Support => enabled
DTrace Support => available, disabled

Registered PHP Streams => https, ftps, php, file, glob, data, http, ftp
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
Registered Stream Filters => string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v4.2.18, Copyright (c) Zend Technologies

 _______________________________________________________________________

Configuration

Core

PHP Version => 8.2.18

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => UTF-8 => UTF-8
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => On => On
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_log_mode => 0644 => 0644
error_prepend_string => no value => no value
error_reporting => 32767 => 32767
expose_php => On => On
extension_dir => /usr/local/lib/php/20220829-zts => /usr/local/lib/php/20220829-zts
fiber.stack_size => no value => no value
file_uploads => On => On
hard_timeout => 2 => 2
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/local/share/phpmailer:/usr/local/share/pear => .:/usr/local/share/phpmailer:/usr/local/share/pear
input_encoding => no value => no value
internal_encoding => no value => no value
log_errors => On => On
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
mail.mixed_lf_and_crlf => Off => Off
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
max_multipart_body_parts => -1 => -1
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_encoding => no value => no value
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 4096K => 4096K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 100 => 100
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sys_temp_dir => no value => no value
syslog.facility => LOG_USER => LOG_USER
syslog.filter => no-ctrl => no-ctrl
syslog.ident => php => php
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.assertions => 1 => 1
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.exception_ignore_args => Off => Off
zend.exception_string_param_max_len => 15 => 15
zend.multibyte => Off => Off
zend.script_encoding => no value => no value

date

date/time support => enabled
timelib version => 2022.10
"Olson" Timezone Database Version => 2024.1
Timezone Database => internal
Default timezone => America/New_York

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.833333 => 90.833333
date.sunset_zenith => 90.833333 => 90.833333
date.timezone => America/New_York => America/New_York

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat murmur3a murmur3c murmur3f xxh32 xxh64 xxh3 xxh128 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 

json

json support => enabled

libxml

libXML support => active
libXML Compiled Version => 2.11.7
libXML Loaded Version => 21107
libXML streams => enabled

mysqlnd

mysqlnd => enabled
Version => mysqlnd 8.2.18
Compression => supported
core SSL => supported
extended SSL => supported
Command buffer size => 4096
Read buffer size => 32768
Read timeout => 86400
Collecting statistics => Yes
Collecting memory statistics => Yes
Tracing => n/a
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
API Extensions =>  

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 3.0.13 30 Jan 2024
OpenSSL Header Version => OpenSSL 3.0.13 30 Jan 2024
Openssl default config => /usr/local/openssl/openssl.cnf

Directive => Local Value => Master Value
openssl.cafile => no value => no value
openssl.capath => no value => no value

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 10.43 2024-02-16
PCRE Unicode Version => 15.0.0
PCRE JIT Support => enabled
PCRE JIT Target => x86 64bit (little endian + unaligned)

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.jit => On => On
pcre.recursion_limit => 100000 => 100000

random

Version => 8.2.18

Reflection

Reflection => enabled

SPL

SPL support => enabled
Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => On => On
assert.bail => Off => Off
assert.callback => no value => no value
assert.exception => On => On
assert.warning => On => On
auto_detect_line_endings => Off => Off
default_socket_timeout => 60 => 60
from => no value => no value
session.trans_sid_hosts => no value => no value
session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form=
unserialize_max_depth => 4096 => 4096
url_rewriter.hosts => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

Additional Modules

Module Name

Environment

Variable => Value
VENDOR => amd
GTK_IM_MODULE => ibus
LOGNAME => amistry
LSCOLORS => DxfxcxdxBxegedabagacad
LANG => en_US.UTF-8
PAGER => more
OSTYPE => FreeBSD
MACHTYPE => x86_64
XDG_DATA_DIRS => /usr/local/kde4/share/akonadi/agents:/usr/local/kde4/share:/usr/local/share:/usr/share
XAUTHORITY => /home/amistry/.Xauthority
CLICOLOR =>  
MAIL => /var/mail/amistry
GNOME_SSH_ASKPASS_GRAB_SERVER => 1
PATH => /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/amistry/bin:/home/amistry/scripts:/usr/local/kde4/bin:/home/amistry/go/bin
EDITOR => edit
XDG_RUNTIME_DIR => /home/amistry/tmp/runtime-amistry
DOTNET_CLI_TELEMETRY_OPTOUT => 1
XIM_ARGS => --daemonize --xim
HOST => bigguy.am-productions.biz
SSH_ASKPASS => ssh-askpass-gtk2
DISPLAY => :0.0
GNOME_SSH_ASKPASS_GRAB_POINTER => 1
PWD => /home/amistry/devel/php-executable/frankenphp/caddy/frankenphp
XIM_PROGRAM => ibus-daemon
GROUP => amistry
GCONF_GLOBAL_LOCKS => 1
VTE_VERSION => 7002
TERM => xterm-256color
WRASTER_COLOR_RESOLUTION0 => 4
CVS_RSH => ssh
MPEGTABLES => /usr/local/lib/mpegaudio/tables
WMAKER_BIN_NAME => wmaker
XMODIFIERS => @im=ibus
LS_COLORS => no=00:fi=00:di=01;33:ln=00;35;40:pi=40;41:so=01;35:bd=40;41;01:cd=40;41;01:or=05;31;01:ex=01;32;40:mi=05;31;01:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.tbz=01;31:*.bz2=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:.dmg=01;31:*.png=00;32:*.jpg=00;32:*.xcf=00;32:*.gif=00;32:*.bmp=00;32:*.ppm=00;32:*.tga=00;32:*.xbm=00;32:*.xpm=00;32:*.tif=00;32:*.psd=00;32:*.jpeg=00;32:*.svg=00;32:*.ico=00;32:*.JPEG=00;32:*.tiff=00;32:*.PSD=00;32:*.JPG=00;32:*.TIFF=00;32:*.PNG=00;32:*.eps=00;32:*.WMF=00;32:*.wmf=00;32:*.eps=00;32:*.MPG=01;36:*.mpg=01;36:*.MPEG=01;36:*.avi=01;36:*.AVI=01;36:*.wmv=01;36:*.WMV=01;36:*.MKV=01;36:*.mkv=01;36:*.vob=01;36:*.VOB=01;36:*.mov=01;36:*.MOV=01;36:*.rm=01;36:*.RM=01;36:*.ogm=01;36:*.OGM=01;36:*.asf=01;36:*.ASF=01;36:*.viv=01;36:*.VIV=01;36:*.mpq=01;36:*.MPQ=01;36:*.divx=01;36
USER => amistry
HOME => /home/amistry
WINDOWPATH => 9
HOSTTYPE => FreeBSD
SHELL => /bin/tcsh
XIM => ibus
COLORTERM => truecolor
SVN_RSH => ssh -l amistry
QT_QPA_PLATFORMTHEME => qt5ct
MM_CHARSET => UTF-8
WINDOWID => 155189251
GOPATH => /home/amistry/go
CDDA_DEVICE => 1,0,0
BLOCKSIZE => K
SHLVL => 2
QT_IM_MODULE => xim

PHP Variables

Variable => Value
$_SERVER['VENDOR'] => amd
$_SERVER['GTK_IM_MODULE'] => ibus
$_SERVER['LOGNAME'] => amistry
$_SERVER['LSCOLORS'] => DxfxcxdxBxegedabagacad
$_SERVER['LANG'] => en_US.UTF-8
$_SERVER['PAGER'] => more
$_SERVER['OSTYPE'] => FreeBSD
$_SERVER['MACHTYPE'] => x86_64
$_SERVER['XDG_DATA_DIRS'] => /usr/local/kde4/share/akonadi/agents:/usr/local/kde4/share:/usr/local/share:/usr/share
$_SERVER['XAUTHORITY'] => /home/amistry/.Xauthority
$_SERVER['CLICOLOR'] => 
$_SERVER['MAIL'] => /var/mail/amistry
$_SERVER['GNOME_SSH_ASKPASS_GRAB_SERVER'] => 1
$_SERVER['PATH'] => /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/home/amistry/bin:/home/amistry/scripts:/usr/local/kde4/bin:/home/amistry/go/bin
$_SERVER['EDITOR'] => edit
$_SERVER['XDG_RUNTIME_DIR'] => /home/amistry/tmp/runtime-amistry
$_SERVER['DOTNET_CLI_TELEMETRY_OPTOUT'] => 1
$_SERVER['XIM_ARGS'] => --daemonize --xim
$_SERVER['HOST'] => bigguy.am-productions.biz
$_SERVER['SSH_ASKPASS'] => ssh-askpass-gtk2
$_SERVER['DISPLAY'] => :0.0
$_SERVER['GNOME_SSH_ASKPASS_GRAB_POINTER'] => 1
$_SERVER['PWD'] => /home/amistry/devel/php-executable/frankenphp/caddy/frankenphp
$_SERVER['XIM_PROGRAM'] => ibus-daemon
$_SERVER['GROUP'] => amistry
$_SERVER['GCONF_GLOBAL_LOCKS'] => 1
$_SERVER['VTE_VERSION'] => 7002
$_SERVER['TERM'] => xterm-256color
$_SERVER['WRASTER_COLOR_RESOLUTION0'] => 4
$_SERVER['CVS_RSH'] => ssh
$_SERVER['MPEGTABLES'] => /usr/local/lib/mpegaudio/tables
$_SERVER['WMAKER_BIN_NAME'] => wmaker
$_SERVER['XMODIFIERS'] => @im=ibus
$_SERVER['LS_COLORS'] => no=00:fi=00:di=01;33:ln=00;35;40:pi=40;41:so=01;35:bd=40;41;01:cd=40;41;01:or=05;31;01:ex=01;32;40:mi=05;31;01:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.tbz=01;31:*.bz2=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:.dmg=01;31:*.png=00;32:*.jpg=00;32:*.xcf=00;32:*.gif=00;32:*.bmp=00;32:*.ppm=00;32:*.tga=00;32:*.xbm=00;32:*.xpm=00;32:*.tif=00;32:*.psd=00;32:*.jpeg=00;32:*.svg=00;32:*.ico=00;32:*.JPEG=00;32:*.tiff=00;32:*.PSD=00;32:*.JPG=00;32:*.TIFF=00;32:*.PNG=00;32:*.eps=00;32:*.WMF=00;32:*.wmf=00;32:*.eps=00;32:*.MPG=01;36:*.mpg=01;36:*.MPEG=01;36:*.avi=01;36:*.AVI=01;36:*.wmv=01;36:*.WMV=01;36:*.MKV=01;36:*.mkv=01;36:*.vob=01;36:*.VOB=01;36:*.mov=01;36:*.MOV=01;36:*.rm=01;36:*.RM=01;36:*.ogm=01;36:*.OGM=01;36:*.asf=01;36:*.ASF=01;36:*.viv=01;36:*.VIV=01;36:*.mpq=01;36:*.MPQ=01;36:*.divx=01;36
$_SERVER['USER'] => amistry
$_SERVER['HOME'] => /home/amistry
$_SERVER['WINDOWPATH'] => 9
$_SERVER['HOSTTYPE'] => FreeBSD
$_SERVER['SHELL'] => /bin/tcsh
$_SERVER['XIM'] => ibus
$_SERVER['COLORTERM'] => truecolor
$_SERVER['SVN_RSH'] => ssh -l amistry
$_SERVER['QT_QPA_PLATFORMTHEME'] => qt5ct
$_SERVER['MM_CHARSET'] => UTF-8
$_SERVER['WINDOWID'] => 155189251
$_SERVER['GOPATH'] => /home/amistry/go
$_SERVER['CDDA_DEVICE'] => 1,0,0
$_SERVER['BLOCKSIZE'] => K
$_SERVER['SHLVL'] => 2
$_SERVER['QT_IM_MODULE'] => xim
$_SERVER['PHP_SELF'] => 
$_SERVER['SCRIPT_NAME'] => 
$_SERVER['SCRIPT_FILENAME'] => 
$_SERVER['PATH_TRANSLATED'] => 
$_SERVER['DOCUMENT_ROOT'] => 
$_SERVER['REQUEST_TIME_FLOAT'] => 1714102117.4243
$_SERVER['REQUEST_TIME'] => 1714102117
$_SERVER['argv'] => Array
(
)

$_SERVER['argc'] => 0

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.

Relevant log output

No response

dunglas commented 6 months ago

FreeBSD isn't supported yet. That would be nice (and not to hard) to have support for it, but AFAIK the project has never been tested on this OS and we don't have a CI for it.

We'll be glad to accept patch adding proper FreeBSD support, we also accept sponsorships to implement proper FreeBDD support :)

arcanumbridge commented 6 months ago

Understood. That's what I'm trying to do. If you have any pointers on where to start looking regarding this error that would be helpful.

dunglas commented 6 months ago

I would first try to compile without relying on xcaddy (which is known to sometimes cause weird issues).

These instructions should work on FreeBSD (but I never tried).

arcanumbridge commented 6 months ago

Already tried that. Compiles just fine. Same error on execute, I used a modified version of the command: CGO_CFLAGS="$(php-config --includes) -I${LOCALBASE}/include" CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" go build