{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/1155","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/1155/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/1155/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/1155/events","html_url":"https://github.com/tbeu/Modelica/issues/1155","id":197570239,"number":1155,"title":"Binaries in the Modelica Standard Library","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":506762997,"url":"https://api.github.com/repos/tbeu/Modelica/labels/bug","name":"bug","color":"ee0701","default":true},{"id":506768950,"url":"https://api.github.com/repos/tbeu/Modelica/labels/L:C-Sources","name":"L:C-Sources","color":"0000aa","default":false},{"id":506770144,"url":"https://api.github.com/repos/tbeu/Modelica/labels/P:%20high","name":"P: high","color":"ff6666","default":false}],"state":"open","locked":false,"assignee":{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false},"assignees":[{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/tbeu/Modelica/milestones/48","html_url":"https://github.com/tbeu/Modelica/milestone/48","labels_url":"https://api.github.com/repos/tbeu/Modelica/milestones/48/labels","id":2214851,"number":48,"title":"Design79","description":"79th Modelica Design Meeting in Coventry, UK","creator":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"closed","created_at":"2016-12-25T13:00:36Z","updated_at":"2016-12-26T10:09:06Z","due_on":"2013-06-05T07:00:00Z","closed_at":"2016-12-25T13:00:36Z"},"comments":19,"created_at":"2016-12-26T10:08:17Z","updated_at":"2016-12-26T10:11:48Z","closed_at":null,"body":"**Reported by fcasella on 3 Jun 2013 09:13 UTC**\nThe Modelica Standard Library depends on external C and FORTRAN code for its operation.\n\nSome functionality has a well-defined Modelica interface, but its implementation in terms of source code needs to be tool-specific. It is agreed that this functionality is confined to the `ModelicaServices` library, that defines the interface towards the MSL and other libraries. Each tool vendor is then responsible for providing an implementation which works with its tool.\n\nOther functionality is provided by external C code contained in `Modelica/C-sources/`. In this case, the source code is not tool-specific, bu the _very same_ C source code should be compiled in different tools and also on different OS platforms.\n\nThe current situation is that released versions of the MSL only contain the C sources and tool vendors are responsible for compiling and linking these sources with each new tool release. During development of the MSL, the development version of the library on the SVN trunk contains the Dymola-Windows compiled\nversion of new libraries (ModelicaStandardTables at the moment), which are then meant to be removed from the release version of MSL, which will instead refer to the libraries built-in by the tool vendors, and only contain the source code. \n\nThis situation is not optimal for several reasons:\n\n1. It is not possible for any user or developer to checkout any \n   specific revision of the MSL and get it to work out of the box \n   on their Modelica tool, because it lacks the binaries. This is \n   particularly weird for a library that claims to be \"standard\".\n2. Developers of the MSL depend on tool vendors to provide them \n   with updated binaries (in-between official releases),\n   whenever the C-sources are changed on the trunk. This can \n   happen many times during development and testing.\n3. When a development version is ready for release, it needs to be \n   modified in order to strip it from the binaries and change some \n   include files, and this could potentially cause problems.\n4. During development and debugging of new external C code, the\n   MSL trunk contains binaries only for one specific tool and \n   one specific OS, which is unfair towards users of other tools \n   and other OSs.\n  \nWe need to find a long-term sustainable solution that solves this problem also for future similar cases, while allowing to continue the development and testing of MSL 3.2.1 without causing inconveniences.\n  \nThis is my proposal. It is formulated for the addition of the new tables implementation, but it remains valid, mutatis mutandis, for any future addition to the MSL that requires adding external C code.\n\n1. The code for the new tables is compiled in a new library\n   ModelicaStandardTables, making sure that its exported functions \n   have different names than the ones of the old tables \n   implementation, so the very same tool can support MSL < 3.2.1 \n   and MSL >= 3.2.1 at the same time without ambiguities and \n   symbol conflicts at link time. \n2. The ModelicaStandardTables binary will be placed in\n   `Modelica/Resources/Library` (not under \n   `ToolXY/bin/lib`!), which will be referenced by\n   LibraryDirectory annotations in the Modelica functions.  \n3. Each tool vendor provides library compilation scripts for \n   each OS they support, that can be executed by a single command \n   typed at the OS prompt without any special software installed \n   except the Modelica tool itself (e.g., .bat files for Windows, \n   makefiles for Linux). These scripts will be stored under\n   Modelica/Resources/BuildLibraries with appropriate names, \n   e.g. BuildLibrary_Toolname_xxbit), together with a howto.txt\n   file with instructions.\n4. The compilation scripts must also handle dependencies, based on \n   how required libraries such as zlib may or may not be already \n   present in the tool installation and on which C compiler the \n   tool uses.\n5. When shipping a tool for a specific OS (including nightly \n   builds), each tool vendor runs the appropriate makefile, then \n   removes all the unneeded stuff from Modelica/Resources to avoid \n   wasting bandwidth and disk space.\n6. MSL developers can download any version of the tool from \n   modelica.org or checkout any revision from SVN, run the \n   appropriate script with and get an up-to-date, fully functional \n   version of MSL work out of the box. The script only needs to be\n   run at checkout and whenever the sources are updated.\n  \nTo my understanding, this proposal solves all the problems listed above. Furthermore, it allows to test models with the very latest version of the C sources, without waiting for tool vendors to provide the updated binaries, and without tweaking the tool installation, which might not be allowed by the OS settings. \n\nYes, there will be tool-specific code on the MSL trunk (the scripts to build the binaries from sources), but this is not meant to provide unfair advantage for a tool over another one, but rather to ease the development effort of the MA community.\n\nMy proposal is that this development model is also adopted for any future addition to the MSL besides the new tables, as well as for the new Table maintenance. We cannot get rid of ModelicaInternalC for backwards compatibility, but we can at least stop adding new code to it. \n\nTool developers are recommended not to patch the C sources locally on their tools, but rather to contribute to the development of more general and robust versions of the code on the SVN trunk, in the same spirit the rest of the MSL is developed. It might also be useful for other libraries that depend on external C code, such as ExternalMedia.\n\nMy recommendation is that this process is tried out immediately on MSL 3.2.1, since it fits the main requirement of this release of being fully standard and tool-neutral.\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/1155"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/269195927","html_url":"https://github.com/tbeu/Modelica/issues/1155#issuecomment-269195927","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/1155","id":269195927,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"created_at":"2016-12-26T10:11:48Z","updated_at":"2016-12-26T10:11:48Z","body":"**Comment by otter on 18 Jul 2013 12:20 UTC**\nSummary of discussion:\n- If MSL relies on C-source, the C-code is provided under Resources, if practical (e.g. not practical for Lapack since much too big).\n- Additionally to the-code, build scripts for various compilers and operating systems are provided in order to help a tool vendor to generate a binary library from the C-code.\n- Due to the many different possibilities and the specialities of tools, in a release version of MSL no binary library is provided. It is the tool vendors responsibility to provide binaries."}}
{"actor":{"display_login":"modelica-trac-importer"}}