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

Windows matlab compile issue #46

Open
AsIlll223 opened this issue Jan 29, 2024 · 1 comment
Open

Windows matlab compile issue #46

AsIlll223 opened this issue Jan 29, 2024 · 1 comment

Comments

@AsIlll223
Copy link

Dear all,

when I compile the fmm3d to the mex file in matlab, here is an issue:

I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x3614): undefined reference to hndiv_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x5d61): undefined reference to hfmm3d_ndiv__'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x694b): undefined reference to h3ddirectcp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x73bb): undefined reference to h3ddirectdp_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x7fbc): undefined reference to h3ddirectcdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x8b62): undefined reference to h3ddirectcg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x97a2): undefined reference to h3ddirectdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xa5c3): undefined reference to h3ddirectcdg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xaee4): undefined reference to lndiv_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xd1ed): undefined reference to lfmm3d_ndiv__'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xdbd4): undefined reference to l3ddirectcp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xe484): undefined reference to l3ddirectdp_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xee61): undefined reference to l3ddirectcdp_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0xf89c): undefined reference to l3ddirectcg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x1030c): undefined reference to l3ddirectdg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x10ebe): undefined reference to l3ddirectcdg_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x11a69): undefined reference to l3ddirectch_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x12639): undefined reference to l3ddirectdh_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x13395): undefined reference to l3ddirectcdh_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x14fc4): undefined reference to emfmm3d_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x16b1f): undefined reference to em3ddirect_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x184e7): undefined reference to stfmm3d_'
I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x19239): undefined reference to
st3ddirectstokg_' I:/Msys2/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Admin\AppData\Local\Temp\mex_2577111801590582_27384\fmm3d.obj:fmm3d.c:(.text+0x1a1e6): undefined reference to st3ddirectstokstrsg_'
collect2.exe: error: ld returned 1 exit status

image
image

Could anyone help me ?

@lu1and10
Copy link
Member

lu1and10 commented Jan 29, 2024

@AsIlll223 I guess you modified the makefile.windows for powershell? makefile.windows has not been updated for a while. And it seems that you also replaced

FMM3D/makefile.windows

Lines 75 to 94 in 31173b2

COM = src\Common
COMOBJS = $(COM)\besseljs3d.o $(COM)\cdjseval3d.o $(COM)\dfft.o \
$(COM)\fmmcommon.o $(COM)\legeexps.o $(COM)\prini.o \
$(COM)\rotgen.o $(COM)\rotproj.o $(COM)\rotviarecur.o \
$(COM)\tree_lr_3d.o $(COM)\yrecursion.o
# Helmholtz objects
HELM = src\Helmholtz
HOBJS = $(HELM)\h3dcommon.o $(HELM)\h3dterms.o $(HELM)\h3dtrans.o \
$(HELM)\helmrouts3d.o $(HELM)\hfmm3d.o $(HELM)\hfmm3dwrap.o \
$(HELM)\hfmm3dwrap_legacy.o $(HELM)\hfmm3dwrap_vec.o $(HELM)\hpwrouts.o \
$(HELM)\hwts3e.o $(HELM)\hnumphys.o $(HELM)\hnumfour.o $(HELM)\projections.o \
$(HELM)\hfmm3d_mps.o
# Laplace objects
LAP = src\Laplace
LOBJS = $(LAP)\lwtsexp_sep1.o $(LAP)\l3dterms.o $(LAP)\l3dtrans.o \
$(LAP)\laprouts3d.o $(LAP)\lfmm3d.o $(LAP)\lfmm3dwrap.o \
$(LAP)\lfmm3dwrap_legacy.o $(LAP)\lfmm3dwrap_vec.o $(LAP)\lwtsexp_sep2.o \
$(LAP)\lpwrouts.o
with

FMM3D/makefile

Lines 94 to 122 in 31173b2

COM = src/Common
COMOBJS = $(COM)/besseljs3d.o $(COM)/cdjseval3d.o $(COM)/dfft.o \
$(COM)/fmmcommon.o $(COM)/legeexps.o $(COM)/prini.o \
$(COM)/rotgen.o $(COM)/rotproj.o $(COM)/rotviarecur.o \
$(COM)/tree_routs3d.o $(COM)/pts_tree3d.o $(COM)/yrecursion.o \
$(COM)/cumsum.o
# Helmholtz objects
HELM = src/Helmholtz
HOBJS = $(HELM)/h3dcommon.o $(HELM)/h3dterms.o $(HELM)/h3dtrans.o \
$(HELM)/helmrouts3d.o $(HELM)/hfmm3d.o $(HELM)/hfmm3dwrap.o \
$(HELM)/hfmm3dwrap_legacy.o $(HELM)/hfmm3dwrap_vec.o $(HELM)/hpwrouts.o \
$(HELM)/hwts3e.o $(HELM)/hnumphys.o $(HELM)/hnumfour.o $(HELM)/projections.o \
$(HELM)/hfmm3d_mps.o $(HELM)/hfmm3d_memest.o $(HELM)/hfmm3d_ndiv.o
# Laplace objects
LAP = src/Laplace
LOBJS = $(LAP)/lwtsexp_sep1.o $(LAP)/l3dterms.o $(LAP)/l3dtrans.o \
$(LAP)/laprouts3d.o $(LAP)/lfmm3d.o $(LAP)/lfmm3dwrap.o \
$(LAP)/lfmm3dwrap_legacy.o $(LAP)/lfmm3dwrap_vec.o $(LAP)/lwtsexp_sep2.o \
$(LAP)/lpwrouts.o $(LAP)/lfmm3d_ndiv.o
# Stokes objects
STOK = src/Stokes
STOBJS = $(STOK)/stfmm3d.o $(STOK)/stokkernels.o
# Maxwell objects
EM = src/Maxwell
EMOBJS = $(EM)/emfmm3d.o
?
And OBJS = $(COMOBJS) $(HOBJS) $(LOBJS) $(STOBJS) $(EMOBJS) should be used in your makefile, right?

Could you try clean all the src/Common/*.o, src/Helmholtz/*.o, src/Laplace/*.o, src/Maxwell/*.o, Stokes/*.o and the libfmm3d.a. And rerun the make matlab. Weirdly it seems using the libfmm3d.a missing the symbols.

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

No branches or pull requests

2 participants