DEPRECATED ... install MegaTunix on OS-X

Questions specific to Megatunix - alternate tuning software that runs on unix and windows.
Note that Megatunix is obsolete.

Moderator: djandruczyk

Did this work and was it easy to follow?

Yes and it was easy
9
56%
Yes, but it was a pain in the butt!
2
13%
No, I failed miserably and donno what to do
5
31%
I had my son/daughter do it for me
0
No votes
 
Total votes: 16

bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

well i hate to be the one to break new waters, as i am definitely not a unix expert. I kinda focused the problem down to the libglade2 install, allthough i do not know how to repair it. after doing a few different things (rebuilding glib2) i attempted to install the libglade again, and got this error which i thought was a good thing:

patrick-sachs-computer:~ Patrick$ sudo port install libglade2
---> Building libglade2 with target all
---> Staging libglade2 into destroot
---> Installing libglade2 2.6.2_0
---> Activating libglade2 2.6.2_0
Error: Target org.macports.activate returned: Image error: Another version of this port (libglade2 @2.6.0_1) is already active.
Error: Status 1 encountered during processing.

So i figured it was there, and went ahead with the ./configure make sudo make install and got these errors:

config.status: config.h is unchanged
config.status: executing depfiles commands
sed: 1: "s/$(DEPDIR)/${subdirs}/ ...": bad flag in substitute command: '.'

Configuration:

Install Path: /opt/local
Using Cairo: yes
General Debugging: no
Profiling: no

Thought it still configured properly so went ahead with make and got this:

ld: warning, duplicate dylib /opt/local/lib/libfreetype.6.dylib
ld: warning, duplicate dylib /opt/local/lib/libfontconfig.1.dylib
ld: warning, duplicate dylib /opt/local/lib/libXrender.1.dylib
ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
collect2: ld returned 1 exit status
make[3]: *** [gaugedesigner] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

And again when doing make install got this:

d: warning, duplicate dylib /opt/local/lib/libfreetype.6.dylib
ld: warning, duplicate dylib /opt/local/lib/libfontconfig.1.dylib
ld: warning, duplicate dylib /opt/local/lib/libXrender.1.dylib
ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib
collect2: ld returned 1 exit status
make[2]: *** [gaugedesigner] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1


I will gladly go to the macports people to ask about the problem but unfortunately i have no clue where to start, i think i do have libglad2 installed, which was the only plausible problem i have seen.

thanks for any help dave.
bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

i also went to run it and this is what returned, looking for library now.

bash-3.2$ ./megatunix
dyld: Library not loaded: /opt/local/lib/libfontconfig.1.dylib
Referenced from: /opt/local/bin/./megatunix
Reason: image not found
Trace/BPT trap
bash-3.2$
JustinHoMi
Helpful MS/Extra'er
Posts: 105
Joined: Sun Nov 25, 2007 7:14 pm
Location: Hillsborough, NC
Contact:

Post by JustinHoMi »

I got it to work with 10.5 using Fink. I had trouble with DarwinPorts (now known as MacPorts).

Fink wasn't straightforward though. Here are the steps to take:

1. Download fink: http://downloads.sourceforge.net/fink/f ... 7.8.tar.gz
2. Install fink: http://www.finkproject.org/doc/bundled/ ... hp#install

3. Update fink and install required packages:

Code: Select all

fink selfupdate
fink update-all
fink install gtkglext1 libglade2
4. Point megatunix towards the proper GL library. Note that this is a single line, so be careful using cut & paste.

Code: Select all

export LDFLAGS="-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
5. Compile megatunix

Code: Select all

tar xvzf megatunix-<TAB>
cd megatunix-<TAB>
./configure --prefix=/sw
make
sudo make install
bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

Hey thanks!
I got fink and installed all of the packages and ran the script to point megatunix at the proper gl library, however now it cant find the the gtkglext installation (it keeps looking in /opt/local): how do i redirect it?

checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for GLEXT... configure: error: Package requirements (gtkglext-1.0 gdkglext-1.0) were not met:

No package 'gtkglext-1.0' found
No package 'gdkglext-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLEXT_CFLAGS
and GLEXT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


I used the ./configure --prefix=/sw command to configure i thought that would do it but no dice.

Thanks
Patrick
JustinHoMi
Helpful MS/Extra'er
Posts: 105
Joined: Sun Nov 25, 2007 7:14 pm
Location: Hillsborough, NC
Contact:

Post by JustinHoMi »

You should probably uninstall all of the darwinports stuff. Here's how:

Code: Select all

sudo rm -rf /opt/local
rm -rf /Applications/MacPorts
rm -rf /Library/Tcl/macports1.0
rm -rf /Library/LaunchDaemons/org.macports.*
rm -rf /Library/StartupItems/DarwinPortsStartup
Then try again.

If that doesn't work, then try reinstalling gtkglext1 and megatunix. Be sure to run "make clean" in your megatunix source directory before trying to recompile it.
bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

so close!
It is working, however it will not take any input from my keyboard. it complied ok as far as i can tell, but when i run it in x11 this error comes up before it starts, should i try and reinstall libglade?

bash-3.2$ /sw/bin/megatunix

(megatunix:36061): libglade-WARNING **: unknown property `pack_direction' for class `GtkMenuBar'

(megatunix:36061): libglade-WARNING **: unknown property `child_pack_direction' for class `GtkMenuBar'
bash-3.2$

It still opens up and i can run it in offline mode (all the check boxes etc. work) but no field will accept keyboard input.

so d*** close!!
JustinHoMi
Helpful MS/Extra'er
Posts: 105
Joined: Sun Nov 25, 2007 7:14 pm
Location: Hillsborough, NC
Contact:

Post by JustinHoMi »

I don't think the glade errors are significant... I get them too.

Have you tried rebooting? :)
bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

Hey,
I did try rebooting, no luck. I did a complete cleanup and reinstall and got the same results. it is a wierd problem which makes me believe i am just doing something silly. it will take input form my keyboard in any field accept in a few fields one of them being the active comm port field.

Am i just doing something dumb now? not clicking on something? I am in offline mode, however it will not take input when it is looking for the ECU either.

as stated before, so close.
JustinHoMi
Helpful MS/Extra'er
Posts: 105
Joined: Sun Nov 25, 2007 7:14 pm
Location: Hillsborough, NC
Contact:

Post by JustinHoMi »

Oh, well ya know what... I can't type anything in Active Comm Port either. I didn't notice that.
bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

haha, well then i guess we arew in the same boat. how did you manage to define a comm port? was it doing it automatically? David care to comment?
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Post by djandruczyk »

MegaTunix 0.9.15 uses Serial port auto-scan..

The list of ports is defined in the main configfile ~/.MegaTunix/config

Find out what your serial devie is named and add that to the list in the conf file and rerun megatunix and it should find it.

If there wa a way to enumerate from the OS what serial ports where present this would be easier, but AFAIK there is not a portable way to do that.

OS-X compounds that by not normally using a symlink to a more common device name, like /dev/ttyUSB0 like Linux uses. OS-X tends to use /dev/ttys01232138 or similar cryptic syntax.
David J. Andruczyk
MegaTunix author. The only non-java cross platform tuning software for MS-I/II hardware.
Where to get and how to install:
http://msextra.com/viewtopic.php?t=23080
http://sourceforge.net/projects/megatunix
bohalrantipol
MS/Extra Newbie
Posts: 18
Joined: Wed Nov 17, 2004 11:06 pm
Location: virginia

Post by bohalrantipol »

Thanks for the reply,
I went ahead and edited the config file, however it seems like it did see it before i even added the port to the possible list. I have successfully gotten the megasquirt to work in megatune, so i dont think it is the issue. However, megatunix still gets stuck (wont find the megasquirt) at the "initiating background ECU interrogation" step. Here is the config file after i edited it:

[MemViewer]
page3_style=89
page2_style=89
page1_style=89
page0_style=89

[Logviewer]
zoom=1
scroll_delay=0

[Serial]
read_delay=100
port_name=/dev/tty.USA193d1P1.1
baudrate=9600
potential_ports=/dev/ttyUSB0,/dev/ttyS0,/dev/ttyUSB1,/dev/ttyS1,/dev/ttyUSB2,/dev/ttyS2,/dev/ttyUSB3,/dev/ttyS3,/dev/tty.USA193d1p1.1
read_wait=10

[DataLogger]
preferred_delimiter=84

[Global]
dbg_lvl=0
Temp_Scale=81
Tooltips=TRUE
micro_ver=15
minor_ver=9
major_ver=0

[Window]
width=647
height=698
main_x_origin=335
main_y_origin=15
status_width=95
status_height=154
status_x_origin=100
status_y_origin=122


I think i did it right by adding it to the possible port list allthough it was already listed as the "port_name=/dev/tty.USA193d1P1.1"

I really dont want to use my PC for this as megatunix is a far better piece of software in my opinion.

Any help appreciated.
JustinHoMi
Helpful MS/Extra'er
Posts: 105
Joined: Sun Nov 25, 2007 7:14 pm
Location: Hillsborough, NC
Contact:

Post by JustinHoMi »

FYI, I got bored and figured out how to get megatunix to compile with macports. I briefly glanced at it, and everything seems to function the same, except no errors when opening the application.

But I don't have my megasquirt hardware yet, so I haven't tried any communications.

To use MacPorts, first delete any old macports stuff and your old megatunix source directory. If you were using fink, then move /sw to /sw.old for now. Then install the new version of macports and run selfupdate and stuff. Then edit the following file:

Code: Select all

/opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/gtkglext/Portfile
... and insert the following text at the end (this is ONE line):

Code: Select all

configure.ldflags-append        "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
After you've edited the file you should be able to compile everything without errors.

bohalrantipol, I don't think this will help your situation any, but it might be worth a try.
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Post by djandruczyk »

bohalrantipol wrote:Thanks for the reply,
I went ahead and edited the config file, however it seems like it did see it before i even added the port to the possible list. I have successfully gotten the megasquirt to work in megatune, so i dont think it is the issue. However, megatunix still gets stuck (wont find the megasquirt) at the "initiating background ECU interrogation" step. Here is the config file after i edited it:

[MemViewer]
page3_style=89
page2_style=89
page1_style=89
page0_style=89

[Logviewer]
zoom=1
scroll_delay=0

[Serial]
read_delay=100
port_name=/dev/tty.USA193d1P1.1
baudrate=9600
potential_ports=/dev/ttyUSB0,/dev/ttyS0,/dev/ttyUSB1,/dev/ttyS1,/dev/ttyUSB2,/dev/ttyS2,/dev/ttyUSB3,/dev/ttyS3,/dev/tty.USA193d1p1.1
read_wait=10

[DataLogger]
preferred_delimiter=84

[Global]
dbg_lvl=0
Temp_Scale=81
Tooltips=TRUE
micro_ver=15
minor_ver=9
major_ver=0

[Window]
width=647
height=698
main_x_origin=335
main_y_origin=15
status_width=95
status_height=154
status_x_origin=100
status_y_origin=122


I think i did it right by adding it to the possible port list allthough it was already listed as the "port_name=/dev/tty.USA193d1P1.1"

I really dont want to use my PC for this as megatunix is a far better piece of software in my opinion.

Any help appreciated.
If IT stll doesn't work it's likely that permissions on that device are incorrect..
try "chmod 666 /dev/tty.USA193d1p1.1" and then run megatunix to see what happens.. Also consider removing the other nonexistant port names from the conf file as well.
Once you've done the above if it STILL doesn't work, copy and past a snippet of the log messages in the COMMS tab and let me investigate them..
David J. Andruczyk
MegaTunix author. The only non-java cross platform tuning software for MS-I/II hardware.
Where to get and how to install:
http://msextra.com/viewtopic.php?t=23080
http://sourceforge.net/projects/megatunix
blip
MS/Extra Newbie
Posts: 4
Joined: Thu Dec 20, 2007 5:23 am
Location: San Francisco, CA

Post by blip »

Have been trying for several nights to get Megatunix installed without success. I have no unix knowledge. I understand what the terminals function is, but know no code.
Here are my specs:
G4 PowerBook
1.67GHz
Running OSX 10.4.9 (Had 10.3.9 a week ago, wiped it to install)
Installed XCode 2.5 (2.4 no longer avail. on Developers site)
Installed X11SDK
Installed MacPorts 1.6.0
Downloaded Megatunix 0.9.15

After not getting anything to work;

Installed DarwinPorts 1.3.1

Here are some of the Terminal responces:


file has vanished: "ports/textproc/xmlformat/.Portfile.IAV1CL" (in release)
deleting x11/XFree86/work
deleting devel/gtkglext/work

sent 94 bytes received 292015 bytes 4203.01 bytes/sec
total size is 16132242 speedup is 55.23
DEBUG: MacPorts base dir: /opt/local/var/macports/sources/rsync.macports.org/release/base
DEBUG: Setting user: root

MacPorts base version 1.600 installed
DEBUG: Updating using rsync
receiving file list ... done

sent 73 bytes received 6617 bytes 4460.00 bytes/sec
total size is 3962384 speedup is 592.28

Downloaded MacPorts base version 1.600

The MacPorts installation is not outdated and so was not updated
DEBUG: Setting ownership to root
selfupdate done!
Macintosh:~ mikeblah$ sudo port install gtkglext libglade2


pause...

DEBUG: Setting ownership to root
selfupdate done!
Macintosh:~ mikeblah$ sudo port install gtkglext libglade2
---> Fetching XFree86
Error: Target org.macports.fetch returned:

You have an Apple X11SDK installation already.
MacPorts will not overwrite it.

If you wish to use Apple X11,
install it from your Mac OS X install disc.

If you really want to use XFree86 instead,
please move it aside first :

sudo mv /usr/X11R6 /usr/X11R6.apple

Error: The following dependencies failed to build: XFree86 gtk2 atk gettext expat libiconv glib2 pkgconfig cairo fontconfig freetype zlib libpng render xrender gtk-doc docbook-xml-4.1.2 xmlcatmgr docbook-xsl libxml2 perl5.8 scrollkeeper docbook-xml docbook-xml-4.2 docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 libxslt p5-xml-parser jpeg pango Xft2 xorg-xproto xorg-util-macros tiff xorg
Error: Status 1 encountered during processing.
Macintosh:~ mikeblah$


the next day...

Last login: Thu Dec 20 18:04:32 on console
Welcome to Darwin!
Macintosh:~ mikeblah$ sudo port -d selfupdate
Password:
DEBUG: Rebuilding the MacPorts base system if needed.
DEBUG: Synchronizing ports tree(s)
Synchronizing local ports tree from rsync://rsync.macports.org/release/ports/
DEBUG: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/ports/ /opt/local/var/macports/sources/rsync.macports.org/release/ports
rsync: getaddrinfo: rsync.macports.org 873: No address associated with nodename
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-24.1/rsync/clientserver.c(94)
DEBUG: Couldn't sync the ports tree: Synchronization the local ports tree failed doing rsync
while executing
"macports::selfupdate [array get global_options]"
Error: /opt/local/bin/port: port selfupdate failed: Couldn't sync the ports tree: Synchronization the local ports tree failed doing rsync
Macintosh:~ mikeblah$ sudo port install gtkglext libglade2
---> Fetching XFree86
Error: Target org.macports.fetch returned:

You have an Apple X11SDK installation already.
MacPorts will not overwrite it.

If you wish to use Apple X11,
install it from your Mac OS X install disc.

If you really want to use XFree86 instead,
please move it aside first :

sudo mv /usr/X11R6 /usr/X11R6.apple

Error: The following dependencies failed to build: XFree86 gtk2 atk gettext expat libiconv glib2 pkgconfig cairo fontconfig freetype zlib libpng render xrender gtk-doc docbook-xml-4.1.2 xmlcatmgr docbook-xsl libxml2 perl5.8 scrollkeeper docbook-xml docbook-xml-4.2 docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 libxslt p5-xml-parser jpeg pango Xft2 xorg-xproto xorg-util-macros tiff xorg
Error: Status 1 encountered during processing.
Macintosh:~ mikeblah$



Like I said before, I know nothing of unix environments or code. I am barely getting comfortable w/ Mac's OS.

I have tried for several nights to figure this out on my own, but am rather frustrated at this point, not having the necessary knowledge to finish.

thanks
djandruczyk
MS/Extra Guru
Posts: 1210
Joined: Fri May 07, 2004 6:55 pm
Location: Rochester, NY, U.S.A.
Contact:

Post by djandruczyk »

Unfortunately I no longer have my mac mini hooked up to debug or test this. (no connectivity as I'm on wifi here and have connectivity for only 1 system).

Have you tried starting from the beginning over again? or checking the macports site in thei FAQ for errors like you've seen??
David J. Andruczyk
MegaTunix author. The only non-java cross platform tuning software for MS-I/II hardware.
Where to get and how to install:
http://msextra.com/viewtopic.php?t=23080
http://sourceforge.net/projects/megatunix
blip
MS/Extra Newbie
Posts: 4
Joined: Thu Dec 20, 2007 5:23 am
Location: San Francisco, CA

Post by blip »

I am about to wipe everything and try again. If it doesnt work, I'll come a' callin' again :oops:
Thanks for the quick response :D
JustinHoMi
Helpful MS/Extra'er
Posts: 105
Joined: Sun Nov 25, 2007 7:14 pm
Location: Hillsborough, NC
Contact:

Post by JustinHoMi »

blip, try "sudo port -v install gtkglext libglade2 "

That will increase the amount of output to the screen so you can see a more descriptive error message.
blip
MS/Extra Newbie
Posts: 4
Joined: Thu Dec 20, 2007 5:23 am
Location: San Francisco, CA

Post by blip »

Thanks for the tip JustinHoMi.

I wiped everything and started fresh. AM running the first step to the install now.

Ran first command:

sudo port -d selfupdate
sudo port install gtkglext libglade2

It is stuck here:

######################################################################
# As MacPorts does not currently have a post-deactivate hook,
# you will need to ensure that you manually remove the catalog
# entry for this port when you uninstall it. To do so, run
# "xmlcatmgr remove nextCatalog /opt/local/share/xml/docbook/4.1.2/catalog.xml".
######################################################################
---> Cleaning docbook-xml-4.1.2
---> Fetching docbook-xsl
---> Attempting to fetch docbook-xsl-1.72.0.tar.bz2 from http://downloads.sourceforge.net/docbook

I see that at the above link where it is looking, there is a docbook-xsl 1.73.2, but no 1.72.0.tar.bz2 like it says that it is searching for. If I download the 1.73.2, how do I tell it where it is? Or is there something else that I should do?

Also, can someone explain the boxed section aswell.
blip
MS/Extra Newbie
Posts: 4
Joined: Thu Dec 20, 2007 5:23 am
Location: San Francisco, CA

Post by blip »

*bump*
fifth consecutive 12hr graveyard shift :/
Locked