Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#1188 from peteflorence/ipv4
Browse files Browse the repository at this point in the history
warn to use ipv4 on OSX
  • Loading branch information
RussTedrake committed Aug 21, 2015
2 parents cb0c810 + 9e84cfd commit c859390
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drake/addpath_drake.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@

javaaddpath(fullfile(pods_get_base_path,'share','java','drake.jar'));

% OSX platform-specific: check if reverted to IPv4
if (computer('arch') == 'maci64')
ipv4_preferred = java.lang.System.getProperty('java.net.preferIPv4Stack');
if isempty(ipv4_preferred)
ipv4_preferred = 'false';
end
if (ipv4_preferred ~= 'true')
display('WARNING: Your JVM may crash if you do not set it to prefer IPv4 over IPv6.')
display('This may cause any dependencies that involve the JVM (including LCM) to crash at runtime.')
display('Please see bug report and solution here: https://github.com/RobotLocomotion/drake/issues/558.')
display('(It just involves adding one line to your java.opts file for Matlab.)')
display('Make sure to restart Matlab after editing your java.opts file.')
end
end

if ispc
setenv('PATH',[getenv('PATH'),';',GetFullPath(pods_get_lib_path),';',fullfile(root,'pod-build','lib','Release'),';',fullfile(root,'pod-build','lib')]);
end
Expand Down

0 comments on commit c859390

Please sign in to comment.