-
Notifications
You must be signed in to change notification settings - Fork 114
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
clang: error: linker command failed with exit code 1 (use -vto see invocation #16986
Comments
We chatted a bit about this issue and suspect that you have inadvertently wound up mixing different versions of stuff which may be hanging around on different sites and/or that maybe you've done this example at some point in the distant past (producing Best thing is to start from a clean slate... This example is tested in our nightly testing...
@biagas and @brugger1 and @BradWhitlock I worry that perhaps in #4503 I removed instances of |
@biagas ... might you know how to run this example outside of any dependence on the test suite or other developer-related stuff? I think that might be the key issue for this user...how to make this work stand-alone...with a version of VisIt maybe which is a binary download and maybe vanilla make. |
@markcmiller86 not offhand. Might be good to download the example referenced above from visit-users and see what may need to be tweaked in the Makefile provided there. Also, see if the actual source has changed any. |
Ok, found the problem. The tarball dataset is
So, the tarball that got downloaded isn't clean and when the user went to rebuild, |
@markcmiller86 It did work after removing the ALL .o files. Once I start running the simulation in one terminal with the command There should be a file ######.mandelbrot.sim2 that you'll want to open. If there are multiple files that match that pattern then open the most recent one. |
@MuzafarWani thanks for the trace file. That helps. The key issue I see in that trace file I think is this...
I have tried repeating your steps and was experiencing similar problems with a binary download install. However, I had a little more success using my own build of
|
@markcmiller86 Thanks for the prompt reply. I did run with ur suggestion ./mandelbrot -trace trace.txt -dir /home/muzafar/Downloads/installations/3.1.4/linux-x86_64 https://drive.google.com/file/d/1qGCQUCJak0VRMs-5ditQfhe8q1wrxvzn/view?usp=sharing Can you please let me know how to complete all the steps mentioned in http://visitusers.org/index.php?title=VisIt-tutorial-in-situ#Building_the_example |
If you take a look at I see there...
That hints at something. Can you confirm
You should see something like this after running that command (below is from my mac and things are named a little differently there but its the same idea...
If
or, if your env. already has
If none of these ideas work, I think we are out of options. |
FYI...I've tried similar steps but on a Linux system instead of my macOS system...I have been UNable to get it to work on Linux and I've tried a lot of different things. I suspect that we haven't tested running a libsim example from outside of our regular development environments in quite some time (like myabe before we updated osmesa) and we're hitting some new issues. @ARSanderson you use libsim quite a bit. Does any of this sound familiar? |
@markcmiller86 Thanks for you replies Yes it is in visit. It exists in two locations one is /home/muzafar/Downloads/installations/3.1.4/linux-x86_64/lib and second one is LoadVisItLibrary Calling getenv(LD_LIBRARY_PATH) Will the example work on windows system. Also there are few other links mentioned on page One is: https://github.com/visit-dav/visit/tree/develop/src/tools/data/DataManualExamples/Simulations Another one is : https://github.com/visit-dav/visit/tree/develop/src/tools/data/DataManualExamples/Simulations/contrib/pjacobi/ Another Link is: https://github.com/visit-dav/visit/tree/develop/src/tools/data/DataManualExamples/Simulations Will any of the above work on linux system. I want to run one example and then follow the same procedure for the application: |
@markcmiller86 I resolved the issue. the code worked on a different version of ubuntu os. Thank you for your help. |
@MuzafarWani I worry that the |
@MuzafarWani you might find the progression of examples shown in the Also, there are a number of other examples in that directory that might be helpful. |
@markcmiller86 Thank you. |
I am using the visit_libsim_mandelbrot_example for the purpose of in situ visualtion with LibSim+ Visit. The code is present on the below page of VisIt tutorial page
http://visitusers.org/index.php?title=VisIt-tutorial-in-situ#Building_the_example
I am using the Makefile with my changes included below:
Makefile for building mandelbrot simulation using libsim.
###############################################################################
############################## USER EDIT SECTION ################################
Fill in the Path to the VisIt installation. This is the directory that contains
VisIt's 2.13.0 directory. Mac users may want to
use /path/to/VisIt.app/Contents/Resources to locate the "visit" directory
within an app bundle.
VISITHOME=/home/muzafar/Downloads/installations
Set this to the version of VisIt that you use
VISITVERSION=3.1.4
Choose one, depending on your system architecture
#VISITARCH=darwin-x86_64
VISITARCH=linux-x86_64
Edit your compiler and its settings
CXX=clang++
CPPFLAGS=
CXXFLAGS=-O3
LDFLAGS=
LIBS=
#################################################################################
SIMDIR=$(VISITHOME)/$(VISITVERSION)/$(VISITARCH)/libsim/V2
SIM_CXXFLAGS=-I$(SIMDIR)/include
SIM_LDFLAGS=-L$(SIMDIR)/lib
SIM_LIBS=-lsimV2 -ldl
SRC=mandelbrot.C patch.C
OBJ=$(SRC:.C=.o)
SRC_BATCH=mandelbrot_batch.C patch.C
OBJ_BATCH=$(SRC_BATCH:.C=.o)
all: mandelbrot mandelbrot_batch
clean:
rm -f mandelbrot mandelbrot_batch $(OBJ)
mandelbrot: $(OBJ)
$(CXX) -o mandelbrot $ (OBJ) $(LDFLAGS) $ (SIM_LDFLAGS) $(SIM_LIBS) $ (LIBS)
mandelbrot_batch: $(OBJ_BATCH)
$(CXX) -o mandelbrot_batch $ (OBJ_BATCH) $(LDFLAGS) $ (SIM_LDFLAGS) $(SIM_LIBS) $ (LIBS)
.C.o:
$(CXX) $ (CXXFLAGS) $(SIM_CXXFLAGS) $ (CPPFLAGS) -c $<
and the Error I am getting is described as below. I am not able to figure out what the issue is
muzafar@MUZI:~/Downloads/visit_libsim_mandelbrot_example$ make
clang++ -o mandelbrot mandelbrot.o patch.o -L/home/muzafar/Downloads/installations/3.1.4/linux-x86_64/libsim/V2/lib -lsimV2 -ldl
patch.o: file not recognized: file format not recognized
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:47: mandelbrot] Error 1
Can anyone let me know what I have done wrong
The text was updated successfully, but these errors were encountered: