Coder Social home page Coder Social logo

Comments (8)

osergioabreu avatar osergioabreu commented on July 23, 2024 1

from cpython.

Agent-Hellboy avatar Agent-Hellboy commented on July 23, 2024

yes, I once created #116461

from cpython.

eli-schwartz avatar eli-schwartz commented on July 23, 2024

Do you want it to warn or error?

from cpython.

osergioabreu avatar osergioabreu commented on July 23, 2024

It would be friendly to list them:
"ERROR: These packages are required by python to compile but they were not found in your system:

  • package one
  • package foo
  • package bar
    Please install them and retry.

from cpython.

eli-schwartz avatar eli-schwartz commented on July 23, 2024

Reporting on exact package names to install is a hard problem to solve since there are many different linux distros and suggesting:

build-essential checkinstall
libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

will not work since e.g. my distro doesn't have any such packages.

Listing software components like "needs OpenSSL, Readline, ncurses, SQLite, Tk, GDBM, bzip2" could work.

The real trick here is deciding whether they are needed or intentionally omitted. This could be done using autoconf --enable-ssl / --disable-ssl and failing if not found, but you also want a "check" option for the current autodetection...

You can do:

export PYTHONSTRICTEXTENSIONBUILD=1

and make will error out at the end if it failed to build any modules it expected to create -- even if those modules failed for reasons other than a missing configure dependency.

from cpython.

osergioabreu avatar osergioabreu commented on July 23, 2024

Let me explain better:
Sometimes the compiler throws a RED ERROR too fast in the scrolling terminal console but I saw it, it was a C header file missing. So I recompiled with attention to discover "what is this red thing (error)?" and was a header from libffi-dev that I had to install

Is there a way that the compiler STOPS when a critical error occur at least ? I think using EXIT would be a good approach, as the error would be in the screen doing what I expected.

from cpython.

Agent-Hellboy avatar Agent-Hellboy commented on July 23, 2024

Let me explain better:
Sometimes the compiler throws a RED ERROR too fast in the scrolling terminal console but I saw it, it was a C header file missing. So I recompiled with attention to discover "what is this red thing (error)?" and was a header from libffi-dev that I had to install

pipe the output to grep the missing headers

from cpython.

eli-schwartz avatar eli-schwartz commented on July 23, 2024

Well, as I noted you can already tell CPython to emit a make error if a failure occurred.

I guess running make twice could result in the error bubbling up in a much more readable manner. It's a trick I often use to collect build errors:

make -j8 -k # keep going and build everything possible
make -k # print errors for anything that failed the first time

from cpython.

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.