Install Tcl tk binaries in Buildroot - tcl

I want to have tclsh binary in my root file system generated by Buildroot.
In buildroot, we can (from menuconfig) go to Interpreter languages and scripting -> then choose tcl
But this will install tcl8.6 packages (opt0.4, http1.0). The tcl shell itself is not implemented in the generated file system.
Does anyone know how to enable tclsh in Buildroot
Thanks in Advance

You will have to tell buildroot not to remove tclsh from your build. This can be achieved by setting BR2_PACKAGE_TCL_SHLIB_ONLY=n after having run make menuconfig.
See also https://git.busybox.net/buildroot/tree/package/tcl/tcl.mk#n51.

Related

TCL_LIB_SPEC missing in modules install

I'm trying to install modules from SourceForge and I'm getting an error that a variable named TCL_LIB_SPEC is not set. What is this supposed to be set to?
The answer here is to install the TCL development package
% yum install tcl-devel
This gives you a tclConfig.sh file at /usr/lib64/tcl8.5
So
% cd /usr/lib64/tcl8.5
% . ./tclConfig.sh
Then configure works.
It's supposed to be set to the instructions to use with your compiler for linking against the Tcl C library, and it should (conventionally) be generated by running the relevant configure script inside a Tcl source distribution. Or a distribution of Tcl (e.g., on Linux perhaps called tcl-dev) may have alternate correct values already set up.

How do I make Octave see installed Shogun libraries in Ubuntu 16.04?

I copied the commands (from these instructions: http://www.shogun-toolbox.org/install#ubuntu) into the terminal and they seem to have worked, but there is no documentation on how to make Octave find the libraries. I have tried modshogun and init_shogun but Octave cannot find them. I do have the libraries in usr/lib, and I have put that directory on PATH. I have even set usr/lib as my working directory in Octave and that did not help. As far as I have found, there is no Shogun documentation on what to do at this point.
I have also tried compiling Shogun from source, but configure couldn't find GCC. Apparently, this is a known problem with newer versions of GCC. I decided to ask for help with the former method because at least I have the libraries with that.
Edit: I am following the instructions here http://www.shogun-toolbox.org/install#manual-basics
When i do cd build and then "cmake -DINTERFACE_OCTAVE=ON" it tells me there is no cmakelists.txt. There is one in in the above folder, but when I go to that directory and do "cmake -DINTERFACE_OCTAVE=ON" again, it tells me "Shogun can only be built with GPL codes if the source files are in /home/derose/shogun/src/shogun/src/gpl. Please download or disable with LICENSE_GPL_SHOGUN=OFF."
However, when I add -LICENSE_GPL_SHOGUN=OFF as an option, i get the error "CMake Error: The source directory "/home/derose/shogun/src/shogun/-LICENSE_GPL_SHOGUN=OFF" does not exist."
You've linked to the Ubuntu install instructions. From there
These currently do contain the C++ library and Python bindings..
No word that this would include the GNU Octave binding. See below on the same page:
The native C++ interface is always included. The cmake options for building interfaces are -DINTERFACE_PYTHON=ON -DINTERFACE_R .. etc. For example, replace the cmake step above by cmake -DINTERFACE_PYTHON=ON...
So you have to grab the source and fire up cmake with something like -DINTERFACE_OCTAVE=ON
Steps to build the bleeding edge of shogun (the github repo) and the Octave interface:
git clone https://github.com/shogun-toolbox/shogun && cd shogun
git submodule update --init
mkdir build && cd build
cmake .. -DINTERFACE_OCTAVE=ON
make -j4

How to rebuild a Fedora package with a different compiler?

Similarly to this question ("How can I automatically rebuild a package with a different compiler?" on askubuntu.com), I would like to know how can I automate fetching source and compilation of a C program using Fedora build scripts using a specific, non-default compiler - in my case afl-gcc. I would definitely welcome an example of the pv program, but I would like the solution to work for other packages, like libreoffice as well, with minimal modifications. I would like to achieve something similar to aflize (which is for Debian only right now). I have heard of mock and it would be best if I could use it for that.
I do not know to do it automatically, but manually:
Prepare build environnement
$ rpmdev-setuptree
Download corresonding srpms
$ yumdownloader --source foo
Extract files from SRPMS
$ rpm -i foo*.src.rpm
Replace the compiler used
$ sed -i 's/make all/make CC=afl-gcc all/g' ~/rpmbuild/SPECS/foo.spec
setting CC var your corresponding compiler will do the jobs.
If you use cmake take a look to CMAKE_C_COMPILER
Rebuild
$ cd ~/rpmbuild/SPECS/
$ rpmbuild -ba foo.spec
Generated rpm files are located into ~/rpmbuild/RPMS

Decent interactive TCL shell

Is there anything like the iPython notebook for TCL?
Or at the very least, a shell that lets me use ctrl-f, ctrl-b, ctrl-a etc. without filling the shell with ^B etc.
Have a look at tkcon
I like rlwrap tclsh -- see if your OS's package repository has it, or get it from github

how to build hxselect with mingw?

I downloaded html-xml-utils-6.5.tar.gz and started compiling hxselect.c with mingw. I need a makefile, but the package is designed to generate the makefile. The build instructions are in a configure script, config.h.in file and makefile.in.
Is there a mingw-compatible tool to help generate the makefile? I am considering making a linux machine so I can run the configuration to get the generic makefile, and then bring that back for mingw to start chewing on...
Is there an easier way?
Thanks !
Assuming you've downloaded and installed mingw from [1], launch the MinGW Shell
from the start menu and then cd to directory containing the configure script and proceed as you typically do with autotools based projects:
./configure
make
make install
The purpose of MinGW is in fact to make available to Windows a minimalistic GNU environment (meaning shell and other tools) which allow you to work (mostly) as you would in an operating system with a full-fledged GNU userland (such as GNU/Linux). Occasionally it seems that MinGW is used to denote the windows port of the gcc compiler, but it should be empathized that MinGW actually denotes the Windows port of a (minimalistic) GNU environment.
[1] http://www.mingw.org/