Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined reference to mingw #10

Merged
merged 5 commits into from
Nov 28, 2023
Merged

Conversation

eukarpov
Copy link
Member

@eukarpov eukarpov commented Nov 27, 2023

/home/user/cross/bin/aarch64-w64-mingw32-gcc -O2 -DMS_ABI -DMAX_STACK_ALLOC=2048 -Wall -DF_INTERFACE_GFORT -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=20 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.25.dev\" -march=armv8-a -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I..  libopenblas.def dllinit.obj \
-shared -o ../libopenblas.dll -Wl,--out-implib,../libopenblas.dll.a \
-Wl,--whole-archive ../libopenblas_armv8p-r0.3.25.dev.a -Wl,--no-whole-archive  -defaultlib:advapi32 -lgfortran -defaultlib:advapi32 -lgfortran
/home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/../../../../aarch64-w64-mingw32/bin/ld: /home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/libgfortran.a(error.o):(.rdata$.refptr.__gthr_win32_self[.refptr.__gthr_win32_self]+0x0): undefined reference to `__gthr_win32_self'
/home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/../../../../aarch64-w64-mingw32/bin/ld: /home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/libgfortran.a(async.o):(.rdata$.refptr.__gthr_win32_join[.refptr.__gthr_win32_join]+0x0): undefined reference to `__gthr_win32_join'
/home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/../../../../aarch64-w64-mingw32/bin/ld: /home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/libgfortran.a(async.o):(.rdata$.refptr.__gthr_win32_create[.refptr.__gthr_win32_create]+0x0): undefined reference to `__gthr_win32_create'
/home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/../../../../aarch64-w64-mingw32/bin/ld: /home/user/cross/lib/gcc/aarch64-w64-mingw32/14.0.0/libgfortran.a(read.o):(.rdata$.refptr.__strtold[.refptr.__strtold]+0x0): undefined reference to `__strtold'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:124: ../libopenblas.dll] Error 1
make[1]: Leaving directory '/home/user/workspace/OpenBLAS/exports'
make: *** [Makefile:150: shared] Error 2

libgfortran/libgfortran.h Outdated Show resolved Hide resolved
Copy link
Member

@Blackhex Blackhex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this comment clearly says that the __strtold / __strtod / __strtof implementations are relavant to 10 byte long doubles and since aarch64-w64-mingw32 is using 16byte `long double`s (at least for now), I am willing to accept any change that efectively sets:

#define gfc_strtof strtof
#define gfc_strtod strtod
#define gfc_strtold strtold

and that hides / do not use __strtold / __strtod / __strtof.

Is the current state of the PR final in that sense?

@eukarpov
Copy link
Member Author

eukarpov commented Nov 28, 2023

Since this comment clearly says that the __strtold / __strtod / __strtof implementations are relavant to 10 byte long doubles and since aarch64-w64-mingw32 is using 16byte long doubles (at least for now), I am willing to accept any change that efectively sets:

#define gfc_strtof strtof
#define gfc_strtod strtod
#define gfc_strtold strtold

and that hides / do not use __strtold / __strtod / __strtof.

Is the current state of the PR final in that sense?

strtof and strtod should not be impacted as they use float and double
what I understood that the nature of change has been related to long double

extern float __strtof (const char *, char **);
#define gfc_strtof __strtof
extern double __strtod (const char *, char **);
#define gfc_strtod __strtod

I would prefer to keep changes under mingw condition as they are related to it. wdyt?

@Blackhex
Copy link
Member

Blackhex commented Nov 28, 2023

strtof and strtod should not be impacted as they use float and double
what I understood that the nature of change has been related to long double

That's true, sorry for the confusion.

I am fine with any change that hides (stops using) __strtold for aarch64-w64-mingw32.

libgfortran/libgfortran.h Outdated Show resolved Hide resolved
@eukarpov eukarpov merged commit 3a2e384 into woarm64 Nov 28, 2023
1 check passed
eukarpov added a commit that referenced this pull request Nov 29, 2023
Blackhex pushed a commit that referenced this pull request Dec 18, 2023
Blackhex pushed a commit that referenced this pull request Dec 18, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
Blackhex pushed a commit that referenced this pull request Dec 19, 2023
@eukarpov eukarpov deleted the fix_undefined_refernce_mingw branch December 20, 2023 08:41
Blackhex pushed a commit that referenced this pull request Dec 20, 2023
Blackhex pushed a commit that referenced this pull request Dec 20, 2023
Blackhex pushed a commit that referenced this pull request Sep 2, 2024
Blackhex pushed a commit that referenced this pull request Sep 3, 2024
Blackhex pushed a commit that referenced this pull request Sep 4, 2024
Blackhex pushed a commit that referenced this pull request Sep 5, 2024
Blackhex pushed a commit that referenced this pull request Sep 6, 2024
Blackhex pushed a commit that referenced this pull request Sep 7, 2024
Blackhex pushed a commit that referenced this pull request Sep 8, 2024
Blackhex pushed a commit that referenced this pull request Sep 9, 2024
Blackhex pushed a commit that referenced this pull request Sep 10, 2024
Blackhex pushed a commit that referenced this pull request Sep 11, 2024
Blackhex pushed a commit that referenced this pull request Sep 12, 2024
Blackhex pushed a commit that referenced this pull request Sep 13, 2024
Blackhex pushed a commit that referenced this pull request Sep 14, 2024
Blackhex pushed a commit that referenced this pull request Sep 15, 2024
Blackhex pushed a commit that referenced this pull request Sep 16, 2024
Blackhex pushed a commit that referenced this pull request Sep 17, 2024
Blackhex pushed a commit that referenced this pull request Sep 18, 2024
Blackhex pushed a commit that referenced this pull request Sep 19, 2024
Blackhex pushed a commit that referenced this pull request Sep 20, 2024
Blackhex pushed a commit that referenced this pull request Sep 21, 2024
Blackhex pushed a commit that referenced this pull request Sep 22, 2024
Blackhex pushed a commit that referenced this pull request Sep 23, 2024
Blackhex pushed a commit that referenced this pull request Sep 23, 2024
Blackhex pushed a commit that referenced this pull request Sep 24, 2024
Blackhex pushed a commit that referenced this pull request Sep 25, 2024
Blackhex pushed a commit that referenced this pull request Sep 26, 2024
Blackhex pushed a commit that referenced this pull request Sep 27, 2024
Blackhex pushed a commit that referenced this pull request Sep 28, 2024
Blackhex pushed a commit that referenced this pull request Sep 29, 2024
Blackhex pushed a commit that referenced this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants