Giter Site home page Giter Site logo

Fails to build - Ubuntu about cspydr HOT 18 OPEN

spydr06 avatar spydr06 commented on May 18, 2024
Fails to build - Ubuntu

from cspydr.

Comments (18)

Spydr06 avatar Spydr06 commented on May 18, 2024 1

Thanks, was able to reproduce it in a VM, fixing rn!

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Which Ubuntu version?

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

Ubuntu 23.10

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Hopefully fixed with cffa67d

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Did this fix it?

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

I'm currently at work so I will test it once I'm back home and have access to my laptop

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Sure, no pressure

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

Sure, no pressure

That worked, built fine. However it fails to run the executable when running cspc run ...

cspc run helloworld.csp 
  Compiling  helloworld.csp
  Optimizing (2/2) evaluate constant expressions
  Generating assembly for x86_64-linux-gnu
  Linking    helloworld.out (executable; dynamic) (c)
  Executing  helloworld.out
error executing helloworld.out: No such file or directory

The executable is created and present in current directory as well.

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Can you check your dynamic linker using ldd on the generated executable?
It works in my Ubuntu 23.10 VM

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Or try linking statically

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

Can you check your dynamic linker using ldd on the generated executable? It works in my Ubuntu 23.10 VM

ldd helloworld.out 
	linux-vdso.so.1 (0x00007ffd35ad8000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f343b800000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f343bb11000)

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

That seems alright. Can you try linking statically using --static on the compiler?
Also, what error does your shell give you if you just try to run helloworld.out

Sorry for all the questions, I just cannot reproduce this behavior.

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

That seems alright. Can you try linking statically using --static on the compiler? Also, what error does your shell give you if you just try to run helloworld.out

Sorry for all the questions, I just cannot reproduce this behavior.

Same error when running it with --static. Just FYI that the file builds fine into an executable, its the running part that fails when using cspc run

Running the executable manually gives no error, it only fails when doing cspc run ...

Running it with that results in errors:

error executing helloworld.out: No such file or directory
[helloworld.out terminated with exit code 255]

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Ok that's very weird... The "No such file or directory" error could also mean an issue during the linking process, which is much more common in my experience.
What is the path you're trying to run this from? (output of pwd)
It could be that spaces or special characters mess things up.

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

Ok that's very weird... The "No such file or directory" error could also mean an issue during the linking process, which is much more common in my experience. What is the path you're trying to run this from? (output of pwd) It could be that spaces or special characters mess things up.

Sorry for the delay.

pwd:
/home/ishimachi/Downloads exactly the same location where the .csp file exists.

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Please excuse me, but I'm really at a loss with this... The compiler can't see the file or can't execute it, even though the file exists and runs normally from the shell, is that correct?

from cspydr.

Ishimachi avatar Ishimachi commented on May 18, 2024

thats correct

from cspydr.

Spydr06 avatar Spydr06 commented on May 18, 2024

Okay, I'll keep this issue in mind for when I work on that part of the compiler again, as I can't think of any obvious thing wrong right now. I'll keep you updated.
Thank you for your patience :D

from cspydr.

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.