-
Notifications
You must be signed in to change notification settings - Fork 82
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
Can't compile Silice on Arch Linux #255
Comments
I'm on ARCH, I'll try tomorrow. Is this DRAFT branch.
Rob.
…On Wed, 23 Aug 2023, 12:54 Popolon, ***@***.***> wrote:
I started to make an Arch Linux package of Silice, but with default
compiler settings, compilation fail.
- Version of GCC : gcc (GCC) 13.2.1 20230801
The error is the following one :
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp: In member function 'void Silice::LuaPreProcessor::decomposeSource(const std::string&, std::map, t_unit_loc> >&)':
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp:1058:51: error: format not a string literal and no format arguments [-Werror=format-security]
1058 | throw Fatal((w + " has no name").c_str()); // TODO: improve error report (line)
| ^
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp: In function 'std::string fileAbsolutePath(std::string)':
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp:1263:11: warning: ignoring return value of 'char* realpath(const char*, char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
1263 | realpath(f.c_str(), buf);
| ~~~~~~~~^~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [CMakeFiles/libsilice.dir/build.make:116: CMakeFiles/libsilice.dir/src/LuaPreProcessor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:170: CMakeFiles/libsilice.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
I didn't found the mean to resolve this problem in the code.
—
Reply to this email directly, view it on GitHub
<#255>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN4SYT7XNPH66ZKQ2XX52NDXWXVPTANCNFSM6AAAAAA33LFDZU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I used the master branch. |
Morning,
I've just updated from github and rebuilt the "draft" branch. That is
building fine. I'll try the "master" branch in a moment.
Rob.
…On Wed, 23 Aug 2023 at 12:54, Popolon ***@***.***> wrote:
I started to make an Arch Linux package of Silice, but with default
compiler settings, compilation fail.
- Version of GCC : gcc (GCC) 13.2.1 20230801
The error is the following one :
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp: In member function 'void Silice::LuaPreProcessor::decomposeSource(const std::string&, std::map, t_unit_loc> >&)':
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp:1058:51: error: format not a string literal and no format arguments [-Werror=format-security]
1058 | throw Fatal((w + " has no name").c_str()); // TODO: improve error report (line)
| ^
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp: In function 'std::string fileAbsolutePath(std::string)':
/data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp:1263:11: warning: ignoring return value of 'char* realpath(const char*, char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
1263 | realpath(f.c_str(), buf);
| ~~~~~~~~^~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[2]: *** [CMakeFiles/libsilice.dir/build.make:116: CMakeFiles/libsilice.dir/src/LuaPreProcessor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:170: CMakeFiles/libsilice.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
I didn't found the mean to resolve this problem in the code.
—
Reply to this email directly, view it on GitHub
<#255>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN4SYT7XNPH66ZKQ2XX52NDXWXVPTANCNFSM6AAAAAA33LFDZU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Just a quick update, "master" has built fine. It is possible that you are
missing a dependency for Silice to build. Check that you have lua, lua52,
luajit installed?
Rob.
…On Thu, 24 Aug 2023 at 07:55, Rob Shelton ***@***.***> wrote:
Morning,
I've just updated from github and rebuilt the "draft" branch. That is
building fine. I'll try the "master" branch in a moment.
Rob.
On Wed, 23 Aug 2023 at 12:54, Popolon ***@***.***> wrote:
> I started to make an Arch Linux package of Silice, but with default
> compiler settings, compilation fail.
>
> - Version of GCC : gcc (GCC) 13.2.1 20230801
>
> The error is the following one :
>
> /data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp: In member function 'void Silice::LuaPreProcessor::decomposeSource(const std::string&, std::map, t_unit_loc> >&)':
> /data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp:1058:51: error: format not a string literal and no format arguments [-Werror=format-security]
> 1058 | throw Fatal((w + " has no name").c_str()); // TODO: improve error report (line)
> | ^
> /data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp: In function 'std::string fileAbsolutePath(std::string)':
> /data/pacaur/silice/src/Silice/src/LuaPreProcessor.cpp:1263:11: warning: ignoring return value of 'char* realpath(const char*, char*)' declared with attribute 'warn_unused_result' [-Wunused-result]
> 1263 | realpath(f.c_str(), buf);
> | ~~~~~~~~^~~~~~~~~~~~~~~~
> cc1plus: some warnings being treated as errors
> make[2]: *** [CMakeFiles/libsilice.dir/build.make:116: CMakeFiles/libsilice.dir/src/LuaPreProcessor.cpp.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:170: CMakeFiles/libsilice.dir/all] Error 2
> make: *** [Makefile:156: all] Error 2
>
> I didn't found the mean to resolve this problem in the code.
>
> —
> Reply to this email directly, view it on GitHub
> <#255>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AN4SYT7XNPH66ZKQ2XX52NDXWXVPTANCNFSM6AAAAAA33LFDZU>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
An ArchLinux package would be great! Thanks @rob-ng15 for testing ; on a fresh Archlinux (gcc 13.2.1 20230801) "master" also compiled on my side. @Popolon looking at the messages it seems like tighter security (warnings considered errors), maybe a different default g++ setting? I definitely will fix those, but would help to be able to reproduce on my side. I'll investigate! |
I pushed a fix (both in master and draft). I enabled the warning as error in the CMakeLists.txt (using -Werror=...) such that I can trigger the same compiler behavior. There might be others, please let me know how it goes. (I'll likely enable -Werror to resolve all warnings, unfortunately a few are in third party libs). |
@rob-ng15 I have both Lua version, but it's not related at all (and looks like Silice use statically linked liblua.a), that's an error related to type/cast, and strong default warning policy. @sylefeb Thank you very much, this resolved the problem. Everything is compiled. I will update this ticket with the informations about the Arch package, as soon I finished it. |
The package is now available at : https://aur.archlinux.org/packages/silice-git It looks like, from the sources, only silice binary is needed to be installed in bin/ can you confirm? |
I had more time to test the package, libSL-small had to be installed in /usr/src/libs/ and 2 .py scripts in /usr/bin, I can now synthesize and run examples with verilator. |
I just tested to synthesize blink example in learn-silice folder and it worked with Verilator. for framworks, I noticed in sources (confirmed by a ./src/SiliceCompiler.cpp: frameworks_dir = std::string(LibSL::System::Application::executablePath()) + "../frameworks/"; ./src/SiliceCompiler.cpp: CONFIG.keyValues()["frameworks_dir"] = frameworks_dir; ./src/SiliceCompiler.cpp: CONFIG.keyValues()["templates_path"] = frameworks_dir + "/templates"; ./src/SiliceCompiler.cpp: CONFIG.keyValues()["libraries_path"] = frameworks_dir + "/libraries"; In should be in |
I just updated package to put frameworks in /usr/share/silice/frameworks and a patch to change both silice binary and silice-make.py with this as default path. |
Sounds like a good approach for now, thanks! I'll look into using CMAKE_INSTALL_PREFIX correctly (also relates to #240), which hopefully could help packaging without creating trouble for local builds. |
Hi Everyone, this issue should be fixed by the changes in the I also revised the 'getting started' scripts and created a I will merge to |
I started to make an Arch Linux package of Silice, but with default compiler settings, compilation fail.
The error is the following one :
I didn't found the mean to resolve this problem in the code.
The text was updated successfully, but these errors were encountered: