- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AOCC4.0-flang error :"ld.lld: error: undefined symbol: MAIN_"
Hello everyone,
When I compile vasp-5.4.4 with aocc4.0 on amd-zen2 platform,I get an error:
ld.lld: error: undefined symbol: MAIN_
>>> referenced by flangmain.c:59 (/home/amd/JENKINS/workspace/AOCC_4_0_0_INTERIM/flang/runtime/flangmain/flangmain.c:59)
>>> flangmain.c.o:(main) in archive /home/xxx/amd/aocc-compiler-4.0.0/bin/../lib/libflangmain.a
>>> did you mean: MAIN__
>>> defined in: /home/xxx/amd/aocc-compiler-4.0.0/bin/../lib/libflangrti.so
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
Is this a bug in the compiler itself?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yaoming,
Can experiment with below changes in your configuration file?
CPP = flang -E -P -C -w -Mfree $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)
FC = mpif90 -fopenmp
FCL = mpif90 -fopenmp
FREE = -ffree-form -ffree-line-length-none
FFLAGS = -w -march=znver3 -fno-fortran-main $(CPP_OPTIONS) -Mbackslash -ffunc-args-alias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reaching out.
For AOCC related support, the AMD Server Gurus community is the right place to post any query/issue. I'm moving this post there.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,I met the same problem and use this method,but I still can't solve the problem. Can you give me other advice? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, Are you using the same application?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, but I can't solve the problem by changing the configuration file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, but I can't solve the problem by the answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ppxxyy123, are you still facing issue with above solution provided?
if yes please share the exact error message and build log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Yaoming,
Can experiment with below changes in your configuration file?
CPP = flang -E -P -C -w -Mfree $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)
FC = mpif90 -fopenmp
FCL = mpif90 -fopenmp
FREE = -ffree-form -ffree-line-length-none
FFLAGS = -w -march=znver3 -fno-fortran-main $(CPP_OPTIONS) -Mbackslash -ffunc-args-alias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
This configuration file is indeed valid. The reason for this error is that clang cannot convert the .F file into a .f90 file. What I want to ask you is which compilation option makes its compilation pass.
This is my first time in the community, so I don't know if the message to ask you for advice has been sent out, but this question is very urgent for me, so I have to ask again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you change clang to flang then it work as preprocessor (I don't know why this behavior change). But my compilation end at incar_reader where it indicate parathensis not match
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Same problem, seems the fortran preprocessor give empty output in AOCC 4.0
Any flag for the preprocessor changed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello David,
Does the post marked as solution in this thread help you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes this does solve the problem, thanks!
