Coder Social home page Coder Social logo

bettersis's Introduction

bettersis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bonoldie

bettersis's Issues

[FEATURE] Aggiunta Dockerfile

Buongiorno,

ho provato a creare una immagine Docker da poter utilizzare con bettersis, ma non riesco a farlo andare.
bettersis restituisce degli errori all'avvio.

In allegato il mio dockerfile, e l'errore di bettersis.

In caso sarebbe bello aggiungerlo di default nella repository.

Dockerfile:

FROM ubuntu:18.04

WORKDIR /sis-main

USER root

RUN apt update && apt install sudo wget readline-common sudo rsyslog -y

RUN wget https://github.com/JackHack96/logic-synthesis/releases/download/SIS/sis_1.4-1_amd64.deb -O sis.deb

RUN dpkg -i sis.deb

RUN wget https://github.com/mario33881/betterSIS/releases/download/1.2.1/bettersis.deb

RUN sudo dpkg -i bettersis.deb

WORKDIR /sis-data

CMD [ "bsis" ]

Logs:

# bsis
--- Logging error ---
Traceback (most recent call last):
  File "logging/handlers.py", line 934, in emit
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 855, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 937, in emit
  File "logging/handlers.py", line 866, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "bettersis/bettersis.py", line 684, in <module>
  File "bettersis/bettersis.py", line 651, in main
  File "logging/__init__.py", line 1378, in info
  File "logging/__init__.py", line 1514, in _log
  File "logging/__init__.py", line 1524, in handle
  File "logging/__init__.py", line 1586, in callHandlers
  File "logging/__init__.py", line 894, in handle
  File "logging/handlers.py", line 944, in emit
Message: '[PLATFORM] Using OS: Linux-5.10.76-linuxkit-x86_64-with-debian-buster-sid'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "logging/handlers.py", line 934, in emit
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 855, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 937, in emit
  File "logging/handlers.py", line 866, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "bettersis/bettersis.py", line 684, in <module>
  File "bettersis/bettersis.py", line 652, in main
  File "logging/__init__.py", line 1378, in info
  File "logging/__init__.py", line 1514, in _log
  File "logging/__init__.py", line 1524, in handle
  File "logging/__init__.py", line 1586, in callHandlers
  File "logging/__init__.py", line 894, in handle
  File "logging/handlers.py", line 944, in emit
Message: '[PLATFORM] OS version: #1 SMP Mon Nov 8 10:21:19 UTC 2021'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "logging/handlers.py", line 934, in emit
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 855, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 937, in emit
  File "logging/handlers.py", line 866, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "bettersis/bettersis.py", line 684, in <module>
  File "bettersis/bettersis.py", line 653, in main
  File "logging/__init__.py", line 1378, in info
  File "logging/__init__.py", line 1514, in _log
  File "logging/__init__.py", line 1524, in handle
  File "logging/__init__.py", line 1586, in callHandlers
  File "logging/__init__.py", line 894, in handle
  File "logging/handlers.py", line 944, in emit
Message: '[PLATFORM] Python version: 3.7.5'
Arguments: ()
                                                                       
 ██████╗ ███████╗████████╗████████╗███████╗██████╗ ███████╗██╗███████╗ 
 ██╔══██╗██╔════╝╚══██╔══╝╚══██╔══╝██╔════╝██╔══██╗██╔════╝██║██╔════╝ 
 ██████╔╝█████╗     ██║      ██║   █████╗  ██████╔╝███████╗██║███████╗ 
 ██╔══██╗██╔══╝     ██║      ██║   ██╔══╝  ██╔══██╗╚════██║██║╚════██║ 
 ██████╔╝███████╗   ██║      ██║   ███████╗██║  ██║███████║██║███████║ 
 ╚═════╝ ╚══════╝   ╚═╝      ╚═╝   ╚══════╝╚═╝  ╚═╝╚══════╝╚═╝╚══════╝ 
                                                                       
 ===================================================================== 
                                                                       
                              DISCLAIMER:                              
 BetterSIS, this software, controls SIS in the background and tries to 
 provide modern features                                               
 (such as command history, suggestions and autocompletion)             
 and small improvements to SIS itself. (like the simulate improvement) 
 > SIS is a tool for synthesis and optimization of sequential circuits 
                                                                       
 I'm not affiliated with the SIS developers in any way.                
 You can read more about SIS here:                                     
 https://jackhack96.github.io/logic-synthesis/sis.html                 
                                                                       
 ===================================================================== 
                                                                       
 BetterSIS version:    2021-09-07 1.2.1
 BetterSIS repository: https://github.com/mario33881/betterSIS
 Siswrapper version:   2021-09-05 1.2.2
 Running in the background:  None
--- Logging error ---
Traceback (most recent call last):
  File "logging/handlers.py", line 934, in emit
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 855, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 937, in emit
  File "logging/handlers.py", line 866, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "bettersis/bettersis.py", line 684, in <module>
  File "bettersis/bettersis.py", line 664, in main
  File "bettersis/bettersis.py", line 109, in __init__
  File "bettersis/bettersis.py", line 172, in show_msg_on_startup
  File "logging/__init__.py", line 1378, in info
  File "logging/__init__.py", line 1514, in _log
  File "logging/__init__.py", line 1524, in handle
  File "logging/__init__.py", line 1586, in callHandlers
  File "logging/__init__.py", line 894, in handle
  File "logging/handlers.py", line 944, in emit
Message: '[STARTUP_MESSAGE] Showing software versions (BetterSIS: 2021-09-07 1.2.1, Siswrapper: 2021-09-05 1.2.2, SIS: None)'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "bettersis/bettersis.py", line 664, in main
  File "bettersis/bettersis.py", line 126, in __init__
  File "bettersis/bettersis.py", line 191, in main
  File "bettersis/siscompleter.py", line 266, in get_siscompleter
  File "bettersis/siscompleter.py", line 132, in get_commands
AttributeError: 'NoneType' object has no attribute 'split'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 934, in emit
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 855, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "logging/handlers.py", line 937, in emit
  File "logging/handlers.py", line 866, in _connect_unixsocket
FileNotFoundError: [Errno 2] No such file or directory
Call stack:
  File "bettersis/bettersis.py", line 684, in <module>
  File "bettersis/bettersis.py", line 671, in main
  File "logging/__init__.py", line 1425, in critical
  File "logging/__init__.py", line 1514, in _log
  File "logging/__init__.py", line 1524, in handle
  File "logging/__init__.py", line 1586, in callHandlers
  File "logging/__init__.py", line 894, in handle
  File "logging/handlers.py", line 944, in emit
Message: '[MAIN_FUNC] This error was unexpected and interrupted the program: '
Arguments: ()

Traceback:

  File "bettersis/bettersis.py", line 664, in main
  File "bettersis/bettersis.py", line 126, in __init__
  File "bettersis/bettersis.py", line 191, in main
  File "bettersis/siscompleter.py", line 266, in get_siscompleter
  File "bettersis/siscompleter.py", line 132, in get_commands

AttributeError: 'NoneType' object has no attribute 'split'

Please, (if someone didn't post this error already) create a Github Issue here: 'https://github.com/mario33881/betterSIS/issues'
and share the '/var/log/pybettersis/pybettersis.log' log file
to help the developer to fix the problem

> If you are NOT using the DEB package version, execute this command:
> 'cat /var/log/syslog | grep "bettersis" > pybettersis.log'
> to create the log file inside the current directory.

You should also make sure that no private information is present in the log file before publishing it
# 

[FEATURE] Release a Flatpak version

To provide snapcraft-like features (like the ability to install betterSIS via GUI and keeping it up to date) to a more broad userbase betterSIS should also be released as a Flatpak.

snapcraft targets primarily Ubuntu users.

The major obstacle is to allow SIS to find files that are placed inside an hardcoded path:

/usr/local/share/sis

A possible solution that I've found is to use proot: thanks to the -b flag it is possible to "redirect" SIS from the hardcoded path to a custom path which is inside the flatpak container.

From the proot wiki:

The bind mechanism enables one to relocate files and directories. This is typically useful to trick programs that perform access to hard-coded locations, like some installation scripts

Source: https://github.com/proot-me/proot/blob/master/doc/proot/manual.rst#mount---bind-equivalent

I tried it very briefly using this command and it seems to work:

proot -b $PWD/my_sis_folder:/usr/local/share/sis sis

To verify that it works I have copied the files from /usr/local/share/sis inside a folder, redirected SIS to that folder and launching the source script.rugged command. I have then tried to redirect /usr/local/share/sis to a folder that does NOT have SIS files and the source script.rugged command returns a message "file not found".

So the simple solution is to package proot inside the container and use it to execute SIS...

Does calling proot on betterSIS work? Or it must be called on SIS itself? If it only works on SIS then the siswrapper library might need changes to allow the execution of SIS using proot

... But proot is GPL-2 licensed and I don't know if this means that betterSIS must also be GPL licensed.
From what I've found online it seems like distributing a non-modified binary protected by GPL inside a container together with an application that doesn't include the GPL source code is allowed but I'm not sure.

For example I've found people distributing the ffmpeg and pandoc binaries with their application without any issue.

[FEATURE] Include SIS inside the AppImage

AppImages are supposed to be self-contained, meaning that all the dependencies of the application must be inside the AppImage itself.

Since SIS uses hardcoded paths to retrieve files from the /usr/local/share/sis folder, I have decided that having two copies of SIS (one inside the AppImage and one outside to allow the first one to access the share directory) doesn't make any sense and so I've choosen to keep SIS out of the AppImage and ask the user to install it separately.

I've decided to do that because, even if the AppImage is not self-contained, the AppImage still holds value since it allows the user to update the application (thanks to AppImageUpdate) making it a valid alternative to the snapcraft release.

If we decide to use proot for the Flatpak release (related issue), it can also be embedded inside the AppImage to allow SIS to be distributed together with betterSIS.

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.