Skip to content

Conversation

anutosh491
Copy link
Collaborator

@anutosh491
Copy link
Collaborator Author

Hmm, I thought the uploads failed but I see 19.1.2 here
https://beta.mamba.pm/channels/emscripten-forge/packages/llvm#info

Am I missing something ?

@DerThorsten
Copy link
Contributor

DerThorsten commented Oct 21, 2024

@anutosh491 the upload only fails client sided, but not on the server side!
(ie the client believes there was a timeout...but usually stuff ends on the server)

@anutosh491
Copy link
Collaborator Author

Ahh cool. Needed llvm19 for CppInterOp which you already merged. Thanks for the clarification :)

@anutosh491 anutosh491 closed this Oct 21, 2024
@anutosh491 anutosh491 reopened this Oct 21, 2024
@anutosh491
Copy link
Collaborator Author

Might just work out without the -sERROR_ON_UNDEFINED_SYMBOLS=0 flag too. Giving it an attempt !

@anutosh491
Copy link
Collaborator Author

I realized the way i was passing the flags was hampering the symbols. The minor change in the last commit fixes most of it. It's only this one symbol that is undefined

 │ │ wasm-ld: error: ../../../../lib/libclangInterpreter.a(Wasm.cpp.o): undefined symbol: lld::wasm::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm:
 │ │ :raw_ostream&, bool, bool)

Need to figure out how to fix this. If anyone has ideas, they are welcome !

@anutosh491
Copy link
Collaborator Author

anutosh491 commented Oct 21, 2024

Hey @DerThorsten I see you had added this through ec21b92

# clear LDFLAGS flags because they contain sWASM_BIGINT
export LDFLAGS=""

Maybe we won't like to have WASM_BIGINT but don't we need any others maybe like this

-s NO_INVOKE_RUN -s EXIT_RUNTIME -s INITIAL_MEMORY=64MB -s ALLOW_MEMORY_GROWTH -s EXPORTED_RUNTIME_METHODS=FS,callMain -s MODULARIZE -s EXPORT_ES6

Just curious if we need to have no LDFLAGS :\ ?
Do you remember why you did this ?

@anutosh491
Copy link
Collaborator Author

This is now ready. The above link function symbol is available in lldWasm and once the latest Wasm.cpp file was introduced in 19.0 (llvm/llvm-project#86402) to help with running clang-repl and executing C++ code interactively in a wasm context ... we just need to link with lldWasm as the patch does.

@anutosh491 anutosh491 changed the title Increment build number for llvm Fix Undefined Symbols while building llvm Oct 22, 2024

# Build step
EMCC_CFLAGS='-sERROR_ON_UNDEFINED_SYMBOLS=0' emmake make -j1
Copy link
Member

Choose a reason for hiding this comment

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

🎉

Copy link
Collaborator Author

@anutosh491 anutosh491 Oct 22, 2024

Choose a reason for hiding this comment

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

thanks for the review :)

@IsabelParedes IsabelParedes merged commit aff25bf into emscripten-forge:main Oct 22, 2024
1 check passed
@anutosh491 anutosh491 deleted the patch-2 branch October 22, 2024 12:09
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.

3 participants