public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/109904] New: linking with -static flag generates undefined references
@ 2023-05-18 18:07 Gary.White at ColoState dot edu
  2023-05-18 18:11 ` [Bug libgomp/109904] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Gary.White at ColoState dot edu @ 2023-05-18 18:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109904

            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 with
gfortran-13.  I require the -static flag to be able to distribute executable 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=gfortran
COLLECT_LTO_WRAPPER=C:/tdm-gcc-64/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/13.1.0/lto-wrapper.exe
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-w64-mingw32
Configured with: ../configure
--prefix=/R/winlibs64ucrt_stage/inst_gcc-13.1.0/share/gcc
--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
--enable-offload-targets=nvptx-none --with-pkgversion='MinGW-W64
x86_64-msvcrt-posix-seh, built by Brecht Sanders' --with-tune=generic
--enable-checking=release --enable-threads=posix --disable-sjlj-exceptions
--disable-libunwind-exceptions --disable-serial-configure --disable-bootstrap
--enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath
--disable-libstdcxx-debug --disable-version-specific-runtime-libs --with-stabs
--disable-symvers --enable-languages=c,c++,fortran,lto,objc,obj-c++
--disable-gold --disable-nls --disable-stage1-checking --disable-win32-registry
--disable-multilib --enable-ld --enable-libquadmath --enable-libada
--enable-libssp --enable-libstdcxx --enable-lto --enable-fully-dynamic-string
--enable-libgomp --enable-graphite --enable-mingw-wildcard
--enable-libstdcxx-time --enable-libstdcxx-pch
--with-mpc=/d/Prog/winlibs64ucrt_stage/custombuilt
--with-mpfr=/d/Prog/winlibs64ucrt_stage/custombuilt
--with-gmp=/d/Prog/winlibs64ucrt_stage/custombuilt
--with-isl=/d/Prog/winlibs64ucrt_stage/custombuilt --enable-libstdcxx-backtrace
--enable-install-libiberty --enable-__cxa_atexit --without-included-gettext
--with-diagnostics-color=auto --enable-clocale=generic --with-libiconv
--with-system-zlib
--with-build-sysroot=/R/winlibs64ucrt_stage/gcc-13.1.0/build_mingw/mingw-w64
CFLAGS='-I/d/Prog/winlibs64ucrt_stage/custombuilt/include/libdl-win32
-Wno-int-conversion' CXXFLAGS=-Wno-int-conversion LDFLAGS='-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 Sanders)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-05-19  8:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-18 18:07 [Bug fortran/109904] New: linking with -static flag generates undefined references Gary.White at ColoState dot edu
2023-05-18 18:11 ` [Bug libgomp/109904] " pinskia at gcc dot gnu.org
2023-05-18 18:14 ` pinskia at gcc dot gnu.org
2023-05-18 18:28 ` Gary.White at ColoState dot edu
2023-05-18 18:33 ` pinskia at gcc dot gnu.org
2023-05-18 18:36 ` Gary.White at ColoState dot edu
2023-05-18 20:53 ` Gary.White at ColoState dot edu
2023-05-18 20:59 ` pinskia at gcc dot gnu.org
2023-05-18 21:02 ` Gary.White at ColoState dot edu
2023-05-18 21:06 ` pinskia at gcc dot gnu.org
2023-05-18 21:08 ` jakub at gcc dot gnu.org
2023-05-19  8:16 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).