From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D08F63844740; Thu, 18 May 2023 18:07:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D08F63844740 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684433227; bh=+Ja+QBnhaWCxiGztVXJi5Gitm/K49ERjWCQC6wG4Q74=; h=From:To:Subject:Date:From; b=IGzjBqLdJ7sPFbqUWhZCSLFG+0qHEXvO63gTCA/6tnS0yw0aECmt29TAyzHNskuS5 8CfHQgPhSePqNi4h9XyK19vSnzETu0DGJqbOGQEtka73c3t9QafN2bJK/5FmUwdwui NJ4ScHvJdTawqkZDdwzyv3ZCe/ETSJ8/d9MKxiDg= From: "Gary.White at ColoState dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109904] New: linking with -static flag generates undefined references Date: Thu, 18 May 2023 18:07:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Gary.White at ColoState dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109904 Bug ID: 109904 Summary: linking with -static flag generates undefined references Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: Gary.White at ColoState dot edu Target Milestone: --- What follows are a portion of the undefined references when using -static w= ith gfortran-13. I require the -static flag to be able to distribute executabl= e to users not having gfortran on their machines. gfortran -m64 -fopenmp mark.o glabrd.o xmatrx.o tmread.o rlabrd.o blabrd.o dlabrd.o estmat.o varmat.o derivedest.o piread.o func.o saturd.o chprob.o chprob001.o chprob002.o chprob008.o chprob009.o chprob032.o chprob115.o chprob119.o chprob121.o chprob126.o chprob139.o chprob140.o chprob141.o chprob142.o chprob143.o chprob144.o chprob160.o chprob170.o chprob171.o chprob172.o chprob173.o chprob174.o chprob175.o chprob176.o chprob177.o chprob178.o chprob179.o chprob180.o chprob181.o chprob182.o chprob183.o chprob184.o rcread.o kfread.o nsread.o optmiz.o status_module.o prcisub.o prfunc.o mcmc.o hyperread.o gibbsitsub.o optimizers_module.o gaussquad.o hyper_dist_module.o profile_conf_interval_module.o data_module.o design_matrix_funcs_module.o random_values_module.o Linpack.a -o mark64.exe -static -static-libgfortran C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= x86_64-w64-mingw32/bin/ld.exe: C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= lib\libgomp.a(target.o):(.text+0x94f): undefined reference to `dlopen' C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= x86_64-w64-mingw32/bin/ld.exe: C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= lib\libgomp.a(target.o):(.text+0x96a): undefined reference to `dlsym' C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= x86_64-w64-mingw32/bin/ld.exe: C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= lib\libgomp.a(target.o):(.text+0x99f): undefined reference to `dlclose' C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= x86_64-w64-mingw32/bin/ld.exe: C:/tdm-gcc-64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../= lib\libgomp.a(oacc-profiling.o):(.text+0x83d): undefined reference to `dlerror' Specifics of the installation of gfortran are: gfortran -v Using built-in specs. COLLECT_GCC=3Dgfortran COLLECT_LTO_WRAPPER=3DC:/tdm-gcc-64/mingw64/bin/../libexec/gcc/x86_64-w64-m= ingw32/13.1.0/lto-wrapper.exe OFFLOAD_TARGET_NAMES=3Dnvptx-none Target: x86_64-w64-mingw32 Configured with: ../configure --prefix=3D/R/winlibs64ucrt_stage/inst_gcc-13.1.0/share/gcc --build=3Dx86_64-w64-mingw32 --host=3Dx86_64-w64-mingw32 --enable-offload-targets=3Dnvptx-none --with-pkgversion=3D'MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders' --with-tune=3Dgeneric --enable-checking=3Drelease --enable-threads=3Dposix --disable-sjlj-excepti= ons --disable-libunwind-exceptions --disable-serial-configure --disable-bootstr= ap --enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath --disable-libstdcxx-debug --disable-version-specific-runtime-libs --with-st= abs --disable-symvers --enable-languages=3Dc,c++,fortran,lto,objc,obj-c++ --disable-gold --disable-nls --disable-stage1-checking --disable-win32-regi= stry --disable-multilib --enable-ld --enable-libquadmath --enable-libada --enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-stri= ng --enable-libgomp --enable-graphite --enable-mingw-wildcard --enable-libstdcxx-time --enable-libstdcxx-pch --with-mpc=3D/d/Prog/winlibs64ucrt_stage/custombuilt --with-mpfr=3D/d/Prog/winlibs64ucrt_stage/custombuilt --with-gmp=3D/d/Prog/winlibs64ucrt_stage/custombuilt --with-isl=3D/d/Prog/winlibs64ucrt_stage/custombuilt --enable-libstdcxx-bac= ktrace --enable-install-libiberty --enable-__cxa_atexit --without-included-gettext --with-diagnostics-color=3Dauto --enable-clocale=3Dgeneric --with-libiconv --with-system-zlib --with-build-sysroot=3D/R/winlibs64ucrt_stage/gcc-13.1.0/build_mingw/mingw-= w64 CFLAGS=3D'-I/d/Prog/winlibs64ucrt_stage/custombuilt/include/libdl-win32 -Wno-int-conversion' CXXFLAGS=3D-Wno-int-conversion LDFLAGS=3D'-pthread -Wl,--dynamicbase -Wl,--high-entropy-va -Wl,--nxcompat -Wl,--tsaware' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.1.0 (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sand= ers)=