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

What versions of tclsh and sqlite3 should I use to run DRAKONEditor.app on OS X El Capitan? #6

Open
rraallvv opened this Issue Feb 23, 2016 · 18 comments

Comments

Projects
None yet
@rraallvv

I installed Active Tcl as suggested in the read me file, but in my system tclsh and sqlite3 are all over the place with several different versions. If I try to run tclsh drakon_editor.tcl I get a segmentation fault error.

This is how to reproduce the error:

$ which tclsh
/usr/local/bin/tclsh
$ which sqlite3
/Users/user/NVPACK/android-sdk-macosx/platform-tools/sqlite3
$ tclsh
% info patchlevel
8.6.4
% package require sqlite3
3.8.10.2
% sqlite db data.db
Segmentation fault: 11
@rraallvv

This comment has been minimized.

Show comment
Hide comment
@rraallvv

rraallvv Feb 23, 2016

Edited my PATH environment variable leaving just /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin but I'm still getting the segfault

Edited my PATH environment variable leaving just /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin but I'm still getting the segfault

@mgpld

This comment has been minimized.

Show comment
Hide comment
@mgpld

mgpld Feb 24, 2016

Confirmed the segfault on: El Captain version 10.11.3 (15D21)

mgpld commented Feb 24, 2016

Confirmed the segfault on: El Captain version 10.11.3 (15D21)

@stepan-mitkin

This comment has been minimized.

Show comment
Hide comment
@stepan-mitkin

stepan-mitkin Feb 24, 2016

Owner

Looks like it is sqlite which causes the crash under El Capitan.
I submitted a bug report both in Apple and Tcl.
http://core.tcl.tk/tcl/tktview/b9f7093a9e98a8227053c0570e276f8373e6b922

Owner

stepan-mitkin commented Feb 24, 2016

Looks like it is sqlite which causes the crash under El Capitan.
I submitted a bug report both in Apple and Tcl.
http://core.tcl.tk/tcl/tktview/b9f7093a9e98a8227053c0570e276f8373e6b922

@rraallvv

This comment has been minimized.

Show comment
Hide comment
@rraallvv

rraallvv Feb 25, 2016

I was able to run the editor from the command line by installing the package tcl-tk hosted in homebrew and compiling the tkimg from the sources.

For anyone interested here is how I did it:

Install hombrew.

Install the package tcl-tk from homebrew.
brew install homebrew/dupes/tcl-tk

Install tkimg revision 374 (I took that from this script)

svn checkout -r 374 https://svn.code.sf.net/p/tkimg/code/trunk
cd trunk
./configure --prefix=/usr/local/Cellar/tcl-tk/8.6.4
make collate
make install-libraries
cp Img/prefix/include/* /usr/local/Cellar/tcl-tk/8.6.4/include
cp -r Img/exec_prefix/lib/* /usr/local/Cellar/tcl-tk/8.6.4/lib

Add symlinks for tcl-tk

ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/tclsh8.6 /usr/local/bin/tclsh
ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/tclsh8.6 /usr/local/bin/tclsh8.6
ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/wish8.6 /usr/local/bin/wish
ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/wish8.6 /usr/local/bin/wish8.6

rraallvv commented Feb 25, 2016

I was able to run the editor from the command line by installing the package tcl-tk hosted in homebrew and compiling the tkimg from the sources.

For anyone interested here is how I did it:

Install hombrew.

Install the package tcl-tk from homebrew.
brew install homebrew/dupes/tcl-tk

Install tkimg revision 374 (I took that from this script)

svn checkout -r 374 https://svn.code.sf.net/p/tkimg/code/trunk
cd trunk
./configure --prefix=/usr/local/Cellar/tcl-tk/8.6.4
make collate
make install-libraries
cp Img/prefix/include/* /usr/local/Cellar/tcl-tk/8.6.4/include
cp -r Img/exec_prefix/lib/* /usr/local/Cellar/tcl-tk/8.6.4/lib

Add symlinks for tcl-tk

ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/tclsh8.6 /usr/local/bin/tclsh
ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/tclsh8.6 /usr/local/bin/tclsh8.6
ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/wish8.6 /usr/local/bin/wish
ln -s /usr/local/Cellar/tcl-tk/8.6.4/bin/wish8.6 /usr/local/bin/wish8.6
@eyan

This comment has been minimized.

Show comment
Hide comment
@eyan

eyan May 2, 2016

@rraallvv: thank you! you just made my night.

eyan commented May 2, 2016

@rraallvv: thank you! you just made my night.

@wavetossed

This comment has been minimized.

Show comment
Hide comment
@wavetossed

wavetossed Oct 5, 2016

Or using MacPorts https://www.macports.org/

sudo port install tk
cd ~/Downloads/drakon_editor1.27
tclsh8.6 drakon_editor.tcl

And it works!!!

Or using MacPorts https://www.macports.org/

sudo port install tk
cd ~/Downloads/drakon_editor1.27
tclsh8.6 drakon_editor.tcl

And it works!!!

@brossi

This comment has been minimized.

Show comment
Hide comment
@brossi

brossi Oct 5, 2016

@rraallvv in the compile from source section of your Homebrew instructions there's a typo* on line 3. It should be:

./configure --prefix=/usr/local/Cellar/tcl-tk/8.6.4

Also, for anyone running this later, make sure you're referencing the correct Homebrew version of TCL-TK. As of October 5, 2016, it was 8.6.6. You will need to update the script accordingly.

* This could also be a case where my system configuration was different and both could work, depending on how you're set up. I don't have ./configure aliased to configure.

brossi commented Oct 5, 2016

@rraallvv in the compile from source section of your Homebrew instructions there's a typo* on line 3. It should be:

./configure --prefix=/usr/local/Cellar/tcl-tk/8.6.4

Also, for anyone running this later, make sure you're referencing the correct Homebrew version of TCL-TK. As of October 5, 2016, it was 8.6.6. You will need to update the script accordingly.

* This could also be a case where my system configuration was different and both could work, depending on how you're set up. I don't have ./configure aliased to configure.

@rraallvv

This comment has been minimized.

Show comment
Hide comment

rraallvv commented Oct 5, 2016

@brossi thanks.

@brossi

This comment has been minimized.

Show comment
Hide comment
@brossi

brossi Oct 5, 2016

Troubleshooting help for those who come after me.

When OS X 10.11 (El Capitan) was introduced, Apple put in place a default security-oriented feature called System Integrity Protection. To prevent unauthorized tinkering by malicious apps, /System, /sbin, and /usr (with the exception of /usr/local) are locked down beyond the level accessible to a rooted (or sudo'd) user. In most cases it probably works in your favor, but when you're the one trying to do something on your Mac that the system considers malicious, it won't allow it by default.

make install-libraries is one of those operations.

NOTE: THE FOLLOWING COMMANDS WILL MODIFY IMPORTANT, SECURITY-RELATED SETTINGS ON YOUR MAC. ONLY TAKE THESE STEPS IF YOU ARE AWARE OF THE RISKS.

To temporarily configure your Mac to work around this conflict:

  1. Reboot the Mac and hold down Command + R keys simultaneously after you hear the startup chime, this will boot OS X into Recovery Mode

  2. When the OS X Utilities screen appears, pull down the ‘Utilities’ menu at the top of the screen instead, and choose Terminal

  3. Type the following command into the terminal then hit return:

    csrutil disable; reboot
    
  4. You may see a message saying that System Integrity Protection has been disabled and the Mac needs to restart for changes to take effect (or you may not -- I didn't see it), and the Mac will then reboot itself automatically, just let it boot up as normal

  5. After the reboot, from the terminal, run csrutil status to confirm that your changes have been invoked. The response should be System Integrity Protection status: disabled.

  6. Run the operation that gave us problems previously. Cheer when it works.

  7. After you're done, you'll probably want to re-enable System Integrity Protection. You will need to re-run the process to access the Recovery terminal window (Steps 1 and 2). From the terminal, run the command:

    csrutil enable; reboot
    
  8. After your Mac finishes booting up, you'll be back to where you were before you started.

brossi commented Oct 5, 2016

Troubleshooting help for those who come after me.

When OS X 10.11 (El Capitan) was introduced, Apple put in place a default security-oriented feature called System Integrity Protection. To prevent unauthorized tinkering by malicious apps, /System, /sbin, and /usr (with the exception of /usr/local) are locked down beyond the level accessible to a rooted (or sudo'd) user. In most cases it probably works in your favor, but when you're the one trying to do something on your Mac that the system considers malicious, it won't allow it by default.

make install-libraries is one of those operations.

NOTE: THE FOLLOWING COMMANDS WILL MODIFY IMPORTANT, SECURITY-RELATED SETTINGS ON YOUR MAC. ONLY TAKE THESE STEPS IF YOU ARE AWARE OF THE RISKS.

To temporarily configure your Mac to work around this conflict:

  1. Reboot the Mac and hold down Command + R keys simultaneously after you hear the startup chime, this will boot OS X into Recovery Mode

  2. When the OS X Utilities screen appears, pull down the ‘Utilities’ menu at the top of the screen instead, and choose Terminal

  3. Type the following command into the terminal then hit return:

    csrutil disable; reboot
    
  4. You may see a message saying that System Integrity Protection has been disabled and the Mac needs to restart for changes to take effect (or you may not -- I didn't see it), and the Mac will then reboot itself automatically, just let it boot up as normal

  5. After the reboot, from the terminal, run csrutil status to confirm that your changes have been invoked. The response should be System Integrity Protection status: disabled.

  6. Run the operation that gave us problems previously. Cheer when it works.

  7. After you're done, you'll probably want to re-enable System Integrity Protection. You will need to re-run the process to access the Recovery terminal window (Steps 1 and 2). From the terminal, run the command:

    csrutil enable; reboot
    
  8. After your Mac finishes booting up, you'll be back to where you were before you started.

@mcevzar

This comment has been minimized.

Show comment
Hide comment
@mcevzar

mcevzar Oct 30, 2016

I tried all the above approaches in MacOS Sierra with no effect, I still get segmentation error.

mcevzar commented Oct 30, 2016

I tried all the above approaches in MacOS Sierra with no effect, I still get segmentation error.

@remy-actual

This comment has been minimized.

Show comment
Hide comment
@remy-actual

remy-actual Dec 19, 2016

@rraallvv's method got this working for me on El Cap.
Using tcl-tk 8.6.6 as @brossi notes.
Omitted the -r 374 flag from the svn command to use current version of tkimg (r410).
Drakon Editor now runs from the command line with tclsh drakon-editor.tcl 😃

@rraallvv's method got this working for me on El Cap.
Using tcl-tk 8.6.6 as @brossi notes.
Omitted the -r 374 flag from the svn command to use current version of tkimg (r410).
Drakon Editor now runs from the command line with tclsh drakon-editor.tcl 😃

@Serenacula

This comment has been minimized.

Show comment
Hide comment
@Serenacula

Serenacula Mar 21, 2017

Seconding mcevzar here. Even after everything, still getting the same segmentation fault in Mac.

Seconding mcevzar here. Even after everything, still getting the same segmentation fault in Mac.

@youleaf

This comment has been minimized.

Show comment
Hide comment
@youleaf

youleaf Mar 29, 2017

Thanks @rraallvv!

This procedure works on osx sierra (10.12) (just some slight changes):

Install homebrew.

Install the package tcl-tk from homebrew:

brew install homebrew/dupes/tcl-tk
important: this will install the latest version of tcl-tk: check your actual install dir right after the installation and take note of the version and the install path (from now on, it will be <TCL_VERSION>). YMMV.

Install tkimg (current version worked for me):

svn checkout  https://svn.code.sf.net/p/tkimg/code/trunk
cd trunk
./configure --prefix=/usr/local/Cellar/tcl-tk/<TCL_VERSION>
make collate
make install-libraries
cp Img/prefix/include/* /usr/local/Cellar/tcl-tk/<TCL_VERSION>/include
cp -r Img/exec_prefix/lib/* /usr/local/Cellar/tcl-tk/<TCL_VERSION>/lib

Add symlinks for tcl-tk:

ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/tclsh8.6 /usr/local/bin/tclsh
ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/tclsh8.6 /usr/local/bin/tclsh8.6
ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/wish8.6 /usr/local/bin/wish
ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/wish8.6 /usr/local/bin/wish8.6

start drakon editor with:

tclsh drakon_editor.tcl

no need for csrutil disable command for me.

youleaf commented Mar 29, 2017

Thanks @rraallvv!

This procedure works on osx sierra (10.12) (just some slight changes):

Install homebrew.

Install the package tcl-tk from homebrew:

brew install homebrew/dupes/tcl-tk
important: this will install the latest version of tcl-tk: check your actual install dir right after the installation and take note of the version and the install path (from now on, it will be <TCL_VERSION>). YMMV.

Install tkimg (current version worked for me):

svn checkout  https://svn.code.sf.net/p/tkimg/code/trunk
cd trunk
./configure --prefix=/usr/local/Cellar/tcl-tk/<TCL_VERSION>
make collate
make install-libraries
cp Img/prefix/include/* /usr/local/Cellar/tcl-tk/<TCL_VERSION>/include
cp -r Img/exec_prefix/lib/* /usr/local/Cellar/tcl-tk/<TCL_VERSION>/lib

Add symlinks for tcl-tk:

ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/tclsh8.6 /usr/local/bin/tclsh
ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/tclsh8.6 /usr/local/bin/tclsh8.6
ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/wish8.6 /usr/local/bin/wish
ln -s /usr/local/Cellar/tcl-tk/<TCL_VERSION>/bin/wish8.6 /usr/local/bin/wish8.6

start drakon editor with:

tclsh drakon_editor.tcl

no need for csrutil disable command for me.

@FelixJosephBamba

This comment has been minimized.

Show comment
Hide comment
@FelixJosephBamba

FelixJosephBamba Jul 8, 2017

I followed the steps then used: "tclsh drakon_editor.tcl"
I still get an error message: "can't find package snit This script requires snit package. Consider installing tcllib"

I do have a folder containing "tcllib-1.18" How do I go about installing it? Is is even the one to install? Please help

FelixJosephBamba commented Jul 8, 2017

I followed the steps then used: "tclsh drakon_editor.tcl"
I still get an error message: "can't find package snit This script requires snit package. Consider installing tcllib"

I do have a folder containing "tcllib-1.18" How do I go about installing it? Is is even the one to install? Please help

@FlorianHeigl

This comment has been minimized.

Show comment
Hide comment
@FlorianHeigl

FlorianHeigl Sep 2, 2017

Substituted 8.6.7 for 8.6.4 and finally got it starting!

Substituted 8.6.7 for 8.6.4 and finally got it starting!

@vlsi

This comment has been minimized.

Show comment
Hide comment

vlsi commented Sep 15, 2017

Just in case, https://github.com/waddella/tkimg.git works for me (see #18 (comment))

@torjevski

This comment has been minimized.

Show comment
Hide comment
@torjevski

torjevski Dec 25, 2017

hello, @youleaf, can you explain some details please? Where is the folder with drakon_editor1.2* on ur mac? From which folder u executed all commands? Can u please share version of tcl-tk which u are using in present?
I'm using tcl-tk8.6.7
Executing all commands from main DRAKON folder, where drakon_editor.tcl file is, except commands after 'cd trunk'.
still have segmentation fault 11 | MacOS Sierra 10.12.6

I tried everything, disabling System Integrity Protection wasn't successful(after disabling and rebooting SIP-status is still enable), but I still hope that I've done things wrong and it's possible to run DRAKON on my mac someway.

I will be so glad for ur respond!

torjevski commented Dec 25, 2017

hello, @youleaf, can you explain some details please? Where is the folder with drakon_editor1.2* on ur mac? From which folder u executed all commands? Can u please share version of tcl-tk which u are using in present?
I'm using tcl-tk8.6.7
Executing all commands from main DRAKON folder, where drakon_editor.tcl file is, except commands after 'cd trunk'.
still have segmentation fault 11 | MacOS Sierra 10.12.6

I tried everything, disabling System Integrity Protection wasn't successful(after disabling and rebooting SIP-status is still enable), but I still hope that I've done things wrong and it's possible to run DRAKON on my mac someway.

I will be so glad for ur respond!

@torjevski

This comment has been minimized.

Show comment
Hide comment
@torjevski

torjevski Dec 28, 2017

guys, finally it works!!! all that i needed is Tcl reinstallation after OS upgrade.
link to fresh version for people like me: http://drakon-editor.sourceforge.net/editor.html#downloads

guys, finally it works!!! all that i needed is Tcl reinstallation after OS upgrade.
link to fresh version for people like me: http://drakon-editor.sourceforge.net/editor.html#downloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment