-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Duplicate symbol updating EMS #10224
Comments
I'm not sure why this worked before, but the error details say that the symbol is defined in both of those files - why is it defined in both? That should give an error, unless it is defined as a weak symbol or some other method. If you can share the source files, that would help figure this out. |
Hi,
Thx for the reply.
The code is duplicated because I’m trying to convert my Fortran77 code to
EMS, so I have some duplicated variables for that.
I used GCC to deploy this code in Objective-C and XCode and works
perfectly, but when I replace in the makefile the gcc syntaxis doesn’t work.
I can’t upload the code to public people because is a Company Code and I
can’t do that... ;(
Have a good day mate!
|
Another idea is try to port it first to clang. If it works with clang, there's a much better chance it will work with emscripten. Aside from that, I'd investigate why your duplicated code works in gcc and others. It likely works either because one of the two files is actually included but not both (and maybe your emcc makefile has that wrong), or it uses some weak symbol linking or such (which should be obvious in the source code). Finally, if nothing else works, I'd suggest creating a new testcase from scratch, a super-simplified version of the problem part of that codebase, which you can make public. It should show the same commands working in gcc but failing in emcc. |
Ok so that's what I'm using in Fortran 77 to XCode (Objective-C) and WORKS FINE in iOS: F77 to Objective-C:
for2c.sh content:
build_libc_mac.sh content:
Makefile content
---------------------EMS Part F77 to EMScripten:
for2c.sh content:
build_libEMS_mac.sh content:
Makefile content (link libf2c.zip official page)
I put some comments to know what I'm doing. |
Could you post the full emcc failing command line, along with full output of the command when run with EMCC_DEBUG=1? My first suggestion would be that you remove EXPORT_ALL and ERROR_ON_UNDEFINED_SYMBOLS flag. Most projects should not be using those. |
I removed both sentences:
But still saying:
The EMCC_DEBUG=1 File, attached because is too long. |
I looks like you just have to fix your multiple defined symbols. For example I don't think this is an emscripten issue though, more of general C++ development issue. I imagine you would see the same issues with you desktop clang / gcc compiler. |
hi @sbc100 ! Is my "
@kripken said something about do different thing:
How can I try that? What I have to do? The steps, I mean. |
In general emscripten, clang and gcc should all behave exactly the same with respect to multiply defined symbols. Is there any thing special about the symbols that are reported as multiply defined? What type of symbols are they? How do they get defined in the source? |
They are defined using F2C converter. I don't modify the the files. |
Ok, I found some time to look at the files you sent. I couldn't find instructions, but after some poking around I found an emcc command at the bottom of a .sh file. I had to remove Running gcc or clang (I had to remove To fix them, I tried adding That is, these duplicates are from something like
that appear in many files, all the same. Changing them all to
fixes it. |
I did something different. I Renamed the duplicate symbols with other names and used the following sentences:
For each
Then, I take all the
And I have many warnings, but I don't know if they are important:
When I run the last command using
I don't know what to do here. So I tried to remove all the
Some idea? Thank you very much for your help guys! |
Ok the error:
It's due to the Should I add What I have to do to compile |
Using EMSCRIPTEN_KEEPALIVE is the equivalent of using EXPORTED_FUNCTIONS, so you don't need to use both. Sounds like the command line is working for you so you should need EMSCRIPTEN_KEEPALIVE at all. |
I only use The problem now, is when I use
I did a short test using only one
Get the next error when include the
Some idea? |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
Hi all!
I was updating my EMS and using my sentence to compile my code and now I have a new errors that I haven't with the EMS older version:
(Have this error in multiples files, not only in File1 and File2)
This is a new error...
I tried to make
emar rc File1.a File1.o
then
emcc File1.a File2.o -c -o Test.html
But doesn't work!
Some idea?
The text was updated successfully, but these errors were encountered: