Differences between revisions 46 and 50 (spanning 4 versions)
Revision 46 as of 2016-04-19 20:23:08
Size: 8369
Comment:
Revision 50 as of 2016-04-20 15:07:53
Size: 8164
Comment:
Deletions are marked like this. Additions are marked like this.
Line 88: Line 88:
This new feature prevents the BCVTB to set environment variables which are required by the BCVTB to run. As a work-around, proceed as follows:

For version 1.6.0,
This new feature prevents the BCVTB version 1.5.0 and older to set environment variables which are required by the BCVTB to run. As a work-around, proceed as follows:
Line 95: Line 93:
sudo ln -s /usr/local/lib/libbcvtb.dylib /usr/local/lib/bcvtb/vx.y.z/libbcvtb.dylib ln -s $BCVTB_PATH/lib/util/libbcvtb.dylib /usr/local/lib/libbcvtb.dylib
Line 98: Line 96:
where {{{x.y.z}}} is the version of the BCVTB. where {{{$BCVTB_PATH}}} is the path to the BCVTB version to use.
Line 100: Line 98:
For versions of the BCVTB which are older than 1.6.0,

manually copy {{{libbcvtb.dylib}}} to {{{/usr/local/lib/bcvtb/vx.y.z}}} with:

{{{
sudo cp $BCVTB_PATH/lib/util/libbcvtb.dylib /usr/local/lib/bcvtb/vx.y.z/
}}}

Next, create a symbolic link to {{{libbcvtb.dylib}}} as described for version 1.6.0.
Line 111: Line 100:
This is needed by the BCVTB to run. As a work-around, proceed as follows: This is needed by all versions of the BCVTB. As a work-around, proceed as follows:
Line 116: Line 105:
  scutil --get HostName scutil --get HostName
Line 143: Line 132:

See issue #32 on github https://github.com/lbl-srg/bcvtb/issues/32 for more information

Help

For questions that are not addressed here or in the manual, send email to https://groups.google.com/group/bcvtb

1. Compilation problems

1.1. Error when compiling MATLAB

1.1.1. Windows

Under Windows, if the BCVTB is compiled using the Microsoft compiler, then the MATLAB libraries also need to be compiled with the Microsoft compiler. If, however, the gcc compiler has been used when compiling the BCVTB, then the following compilation error may be obtained when compiling the MATLAB libraries:

Writing library for establishBSDSocket.mexw32
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_establishclientsocket'
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_exchangewithsocket'
c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_closeipc'

To fix this problem, open Matlab, run

mex -setup

and select the Microsoft Visual C++ compiler from the menu. This need to be done only once as it updates your Matlab settings.

1.1.2. Linux Ubuntu 10.10 64-bit

In MATLAB R2010b, the command

cd lib/matlab
ant all

may fail with the error message

Warning: You are using gcc version "4.4.4-14ubuntu5)".  The version
     [exec]          currently supported with MEX is "4.3.4".
     [exec]          For a list of currently supported compilers see: 
     [exec]          http://www.mathworks.com/support/compilers/current_release/
     [exec] 
     [exec] /usr/bin/ld: cannot find -lstdc++
     [exec] collect2: ld returned 1 exit status
     [exec] 
     [exec]     mex: link of ' "establishBSDSocket.mexa64"' failed.
     [exec] 
     [exec] ??? Error using ==> mex at 208
     [exec] Unable to complete successfully.
     [exec] 
     [exec] Error in ==>
     [exec] /usr/local/matlab/R2010b/toolbox/simulink/simuli>> nk/+legacycode/@LCT/compile.p>compile
     [exec] at 264
     [exec] 
     [exec] 
     [exec] Error in ==>
     [exec] /usr/local/matlab/R2010b/toolbox/simulink/simulink/+legacycode/@LCT/legacyCodeImpl.p>legacyCodeImpl
     [exec] at 84
     [exec] 
     [exec] 
     [exec] Error in ==> legacy_code at 87
     [exec] [varargout{1:nargout}] = legacycode.LCT.legacyCodeImpl(action,
     [exec] varargin{1:end});
     [exec] 
     [exec] Error in ==> compile at 90
     [exec]       legacy_code('compile', def, ...
     [exec]  

This problem is caused by /usr/bin/ld not finding the stdc++ library. As a work-around, proceed as follows:

Type

sudo emacs ~/.matlab/R2010b/mexopts.sh

In the section  glnxa64) , change the line

CLIBS="$CLIBS -lstdc++"

to

CLIBS="$CLIBS"

Now, the command ant all should work and produce the files libbcvtb_thunk_glnxa64.so, establishBSDSocket.mexa64, exchangeDoublesWithBSDSocket.mexa64 and closeBSDSocket.mexa64.

2. Runtime problems

The following steps typically help analyzing problems if a simulation program does not work as expected.

2.1. Running the BCVTB on Mac OS X version 10.11

Apple has enabled a new default security oriented featured called System Integrity Protection, often called rootless, in OS X 10.11 onwards. This new feature prevents the BCVTB version 1.5.0 and older to set environment variables which are required by the BCVTB to run. As a work-around, proceed as follows:

create a symbolic link to libbcvtb.dylib with:

ln -s $BCVTB_PATH/lib/util/libbcvtb.dylib /usr/local/lib/libbcvtb.dylib 

where $BCVTB_PATH is the path to the BCVTB version to use.

Furthermore, Mac OS X 10.11 does not set the computer's HostName correctly. This is needed by all versions of the BCVTB. As a work-around, proceed as follows:

Check if a HostName is set on your machine from a terminal with:

scutil --get HostName

If there's no HostName set, then set your HostName.

Your HostName must be the same as your computer's local network name.

To find out your computer's local network name,

Open Sharing preferences (choose Apple menu > System Preferences, then click Sharing).