Changelog
The midas git repository uses tags to denote specific releases. Tags are of the format midas-YEAR-MONTH-SUFFIX
, e.g. midas-2019-06-b
. This page details the major changes in each release, and highlights how to update client code to adapt to any changes that are not backwards-compatible.
2019-06
Releases midas-2019-06-a
, midas-2019-06-b
.
Relevant elog entries - 1564 (midas-2019-06 with cmake and c++) and 1526 (How to convert C midas frontends to C++).
Improvements
- Migration from C to C++. You will have to make changes to your clients (see upgrade guide below).
- Ability to compile using cmake/cmake3 as well as make. To use cmake, you can either build manually with
mkdir build; cd build; cmake ..; make; make install
, or use the handy shortcutmake cmake3
. Note that the location where libraries and executables are built has changed - the OS-specific subdirectories (e.g./linux/lib
) has been replaced by a common/lib
and/bin
. - mxml and mscb are now included as git submodules. See the "upgrade guide" instructions for how to checkout the latest version of these modules.
Bug fixes
Known issues
- cmake/cmake3 - ZLIB support is not detected, so gzipped files cannot be written by the logger. Will be fixed in the next release, or you can update midas to a commit after August 2.
- mxml can segfault due to a double free. Will be fixed in the next release, or you can update mxml to commit f6fc49d:
cd mxml; git checkout f6fc49d; cd ..
and re-compile midas.
Upgrade guide
Updating midas
# Grab the new code git checkout develop git pull git checkout midas-2019-06-b git pull git submodule update --init # this will checkout correct versions of mxml and mscb # Tidy up the old build - be sure to delete the deprecated linux directory! make clean make cclean rm -rf linux/bin rm -rf linux/lib rmdir linux # Build the new midas make cmake3 # or "make cmake" on ubuntu and macos
If you have a script that sets up environment variables, you should change PATH
from $MIDASSYS/linux/bin
to $MIDASSYS/bin
.
You should then restart mserver
, mlogger
, mhttpd
, and any other midas programs that you run.
Cleanup unneeded stuff
As mxml and mscb are included as submodules now, you can remove the external packages that were downloaded previously (assuming they aren't used by other experiments on the same machine). E.g.
rm -r $HOME/packages/mxml # new location $MIDASSYS/mxml rm -r $HOME/packages/mscb # new location $MIDASSYS/mscb
Update experiment frontends
- change Makefile to remove $(OS_DIR) from library search path ($MIDASSYS/linux/lib becomes $MIDASSYS/lib) - change Makefile to set mxml include path from $MIDASSYS/../mxml to $MIDASSYS/mxml (to avoid including the wrong version of mxml/strlcpy.h) - update frontend code to use mfe.h and build as C++ a) add #include "mfe.h" after include of midas.h and fix all compilation errors.
NOTE: there should be no "extern C" brackets around MIDAS include files.
NOTE: Expect to see following problems:
a1) duplicate or mismatched declarations of functions defined in mfe.h a2) frontend_name and frontend_file_name should be "const char*" instead of "char*" a3) duplicate "HNDLE hDB" collision with hDB from mfe.c - not sure why it worked before, either use HNDLE hDB from mfe.h or use "extern HNDLE hDB". a4) poll_event() and interrupt_configure() have "source" as "int[]" instead of "int" (why did this work before?) a5) use of "extern int frontend_index" instead of get_frontend_index() from mfe.h a6) bk_create() last argument needs to be cast to (void**) a7) "bool debug" collides with "debug" from mfe.h (why did this work before?)
b) remove no longer needed "extern C" brackets around mfe related code. Ideally there should be no "extern C" brackets anywhere.
c) in the Makefile, change CC=gcc to CC=g++ for compiling and linking everything as C++
c1) fix all compilation problems. most valid C code will compile as valid C++, but there is some known trouble: - return value of malloc() & co needs to be cast to the correct data type: "char* s = (char*)malloc(...)" - some C++ compilers complain about mismatch between signed and unsigned values