@@ -281,8 +281,7 @@ function generateConfigureArgs(config: BuildConfig, installPrefix: string): stri
281
281
`--with-sodium=${ launchpadPath } /libsodium.org/v1.0.18` ,
282
282
`--with-xsl=${ launchpadPath } /gnome.org/libxslt/v1.1.43` ,
283
283
`--with-zlib=${ launchpadPath } /zlib.net/v1.3.1` ,
284
- `--with-bz2=${ launchpadPath } /sourceware.org/bzip2/v1.0.8` ,
285
- `--with-iconv=${ launchpadPath } /gnu.org/libiconv/v1.18.0`
284
+ `--with-bz2=${ launchpadPath } /sourceware.org/bzip2/v1.0.8`
286
285
]
287
286
288
287
// Platform-specific arguments
@@ -303,6 +302,7 @@ function generateConfigureArgs(config: BuildConfig, installPrefix: string): stri
303
302
'--enable-opcache=shared' ,
304
303
'--with-readline' ,
305
304
'--without-zip' ,
305
+ '--with-iconv' ,
306
306
'--without-ldap-sasl'
307
307
]
308
308
}
@@ -799,7 +799,6 @@ async function buildPhp(config: BuildConfig): Promise<string> {
799
799
800
800
// Set up targeted PKG_CONFIG_PATH for essential libraries
801
801
const pkgConfigPaths = [
802
- `${ launchpadRoot } /gnu.org/libiconv/v1.18.0/lib/pkgconfig` ,
803
802
`${ launchpadRoot } /sourceware.org/bzip2/v1.0.8/lib/pkgconfig` ,
804
803
`${ launchpadRoot } /zlib.net/v1.3.1/lib/pkgconfig` ,
805
804
`${ launchpadRoot } /curl.se/v8.15.0/lib/pkgconfig` ,
@@ -820,7 +819,6 @@ async function buildPhp(config: BuildConfig): Promise<string> {
820
819
821
820
// Set up targeted library and include paths
822
821
const libPaths = [
823
- `${ launchpadRoot } /gnu.org/libiconv/v1.18.0/lib` ,
824
822
`${ launchpadRoot } /sourceware.org/bzip2/v1.0.8/lib` ,
825
823
`${ launchpadRoot } /zlib.net/v1.3.1/lib` ,
826
824
`${ launchpadRoot } /curl.se/v8.15.0/lib` ,
@@ -838,7 +836,6 @@ async function buildPhp(config: BuildConfig): Promise<string> {
838
836
]
839
837
840
838
const includePaths = [
841
- `${ launchpadRoot } /gnu.org/libiconv/v1.18.0/include` ,
842
839
`${ launchpadRoot } /sourceware.org/bzip2/v1.0.8/include` ,
843
840
`${ launchpadRoot } /zlib.net/v1.3.1/include` ,
844
841
`${ launchpadRoot } /curl.se/v8.15.0/include` ,
@@ -883,8 +880,13 @@ async function buildPhp(config: BuildConfig): Promise<string> {
883
880
buildEnv . CXX = 'g++'
884
881
buildEnv . CFLAGS = ( buildEnv . CFLAGS || '' ) + ' -O2 -fPIC'
885
882
buildEnv . CXXFLAGS = ( buildEnv . CXXFLAGS || '' ) + ' -O2 -fPIC'
883
+ // Use system libstdc++ and iconv instead of Launchpad's to avoid linking issues
884
+ buildEnv . LDFLAGS = buildEnv . LDFLAGS . replace ( / - L [ ^ \s ] * l i b s t d c x x [ ^ \s ] * / g, '' )
886
885
// Set preprocessor to avoid traditional-cpp issues
887
886
buildEnv . CPP = 'gcc -E'
887
+ // Force use of system iconv to avoid Launchpad libiconv linking issues
888
+ buildEnv . ICONV_CFLAGS = ''
889
+ buildEnv . ICONV_LIBS = '-liconv'
888
890
}
889
891
890
892
log ( 'Running buildconf...' )
0 commit comments