Git Product home page Git Product logo

Comments (6)

markhend avatar markhend commented on May 29, 2024

Hi @samhorsfield96. Try changing the /path/to/seq/lib to the specific path where the Seq shared libs are installed on your system. e.g. For me it is /home/mhenders/.seq/lib/seq. You could also consider setting the LD_LIBRARY_PATH variable (see here for a brief discussion).

You may also need to try it without the -no-pie option, as shown here.

from seq.

samhorsfield96 avatar samhorsfield96 commented on May 29, 2024

Hi @markhend, thanks for such a speedy response. I am already linking directly to the seq lib directory (I changed it in the example just for readability). I am also already adding the seq lib directory to the LD_LIBRARY_PATH variable, and still run into the same issues.

I did try without -no-pie however I run into the below error:

/usr/bin/ld: foo.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

from seq.

markhend avatar markhend commented on May 29, 2024

@samhorsfield96 I have been running the examples again and seeing the same issues as you - lots of 'multiple definition of' errors. I'm using Ubuntu (WSL) as well. Let us dig in a bit more to see if we can determine the root cause. Thank you.

from seq.

markhend avatar markhend commented on May 29, 2024

@samhorsfield96, I haven't determined root cause yet. I got a little closer. Perhaps this might help you.

$ seqc build -o foo.o foo.seq --relocation-model=pic
$ gcc -shared -L/home/mhenders/.seq/lib/seq -o libfoo.so foo.o -lseqrt -lomp
$ gcc -o foo -L/home/mhenders/.seq/lib/seq -lseqrt -L. -lfoo foo.c

/usr/bin/ld: /tmp/ccXc1N7d.o: in function `main':
foo.c:(.text+0xe): undefined reference to `foo'
collect2: error: ld returned 1 exit status

from seq.

samhorsfield96 avatar samhorsfield96 commented on May 29, 2024

@markhend unfortunately I run into the same issue as you

/tmp/ccBJNODw.o: In function `main':
foo.c:(.text+0xa): undefined reference to `foo'
collect2: error: ld returned 1 exit status

from seq.

samhorsfield96 avatar samhorsfield96 commented on May 29, 2024

@markhend compiling with the -c flag gets rid of the multiple definition errors, however foo is an object and not an executable

$ seqc build -o foo.o foo.seq
$ gcc -shared -L/path/to/seq/lib -o libfoo.so foo.o -no-pie -lseqrt -lomp
$ gcc -o foo -lfoo -c foo.c
$ ./foo
-bash: ./foo: cannot execute binary file: Exec format error

from seq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.