{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/571","repository_url":"https://api.github.com/repos/tbeu/ModelicaSpecification","labels_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/571/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/571/comments","events_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/571/events","html_url":"https://github.com/tbeu/ModelicaSpecification/issues/571","id":372220785,"node_id":"MDU6SXNzdWUzNzIyMjA3ODU=","number":571,"title":"BuildProjects to automatically compile Modelica binaries","user":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","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":1097433286,"node_id":"MDU6TGFiZWwxMDk3NDMzMjg2","url":"https://api.github.com/repos/tbeu/ModelicaSpecification/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":{"login":"tbeu","id":5444067,"node_id":"MDQ6VXNlcjU0NDQwNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5444067?v=4","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false},"assignees":[{"login":"tbeu","id":5444067,"node_id":"MDQ6VXNlcjU0NDQwNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5444067?v=4","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/milestones/57","html_url":"https://github.com/tbeu/ModelicaSpecification/milestone/57","labels_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/milestones/57/labels","id":3752891,"node_id":"MDk6TWlsZXN0b25lMzc1Mjg5MQ==","number":57,"title":"Design85","description":"85th Modelica Design Meeting in Regensburg, Germany ","creator":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","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":"2018-10-19T18:43:23Z","updated_at":"2018-10-20T15:08:33Z","due_on":"2015-02-25T08:00:00Z","closed_at":"2018-10-19T18:43:23Z"},"comments":0,"created_at":"2018-10-20T15:08:33Z","updated_at":"2018-10-20T15:08:42Z","closed_at":null,"author_association":"COLLABORATOR","body":"**Reported by sjoelund&#46;se on 26 Feb 2015 12:41 UTC**\nSince some time we have had a directory Modelica/Resources/BuildProjects to make it easier to compile the binary libraries used by the package. This makes maintenance easier since you do not need to compile and keep svn/git updated with new versions of the library all the time (since the user/tool provider can easily compile the source code).\n\nI propose that this is specified and made automatic by Modelica tools (that support external C). I even made a prototype implementation in OpenModelica.\n\nThe following uses the library name ModelicaExternalC2 instead of ModelicaExternalC because OpenModelica itself has ModelicaExternalC pre-compiled:\n```mo\nmodel M\nfunction f\n   input Real time;\n   output Real r;\nexternal \"C\" annotation(Library=\"ModelicaExternalC2\");\nend f;\n\n   Real x = f(time);\nend M;\n```\n\nThe prototype works by looking in the usual library directories for a file libmylib.a or libmylib.so (as well as OPENMODELICAHOME/lib/omc OPENMODELICAHOME/lib and ~/.openmodelica/binaries/PACKAGENAME). If no library is found, it tries to look for modelica://M/Resources/BuildProjects/\\*/autogen.sh. It then tries to run that project using the command below.\n\nThe generated library for ModelicaTables is linked against hdf5 if the system has hdf5 installed. If it is not installed, it asks the OS if the hdf5 is available in the package manager, and if it is it asks for admin rights to install it.\n\n![Image](hdf5-install.png)\n\n```\n[1] 13:32:08 Translation Notification\n[/home/marsj/tmp/a.mo: 2:1-6:6]: Removed directory /tmp/omc_compile_ModelicaExternalC2_7UJy2p\n\n[2] 13:32:08 Translation Notification\n[/home/marsj/tmp/a.mo: 2:1-6:6]: Compiled /home/marsj/.openmodelica/binaries/M/libModelicaExternalC2.so by running build project /home/marsj/tmp/Resources/BuildProjects/autotools\n\n[3] 13:32:08 Translation Notification\n[/home/marsj/tmp/a.mo: 2:1-6:6]: Succeeded with compilation and installation of the library using: command: sh ./autogen.sh && ./configure --libdir='/home/marsj/.openmodelica/binaries/M' && make && make install\n[...]\nReading package lists... Building dependency tree... Reading state information... Suggested packages: libhdf5-doc The following NEW packages will be installed: libhdf5-dev 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 0 B/4616 kB of archives. After this operation, 41.8 MB of additional disk space will be used. Selecting previously unselected package libhdf5-dev. (Reading database ... 755658 files and directories currently installed.) Preparing to unpack .../libhdf5-dev_1.8.12+docs-1.1ubuntu1_amd64.deb ... Unpacking libhdf5-dev (1.8.12+docs-1.1ubuntu1) ... Setting up libhdf5-dev (1.8.12+docs-1.1ubuntu1) ...\n[...]\nLibraries have been installed in: /home/marsj/.openmodelica/binaries/M\n[...]\n\n[4] 13:32:08 Translation Notification\n[/home/marsj/tmp/a.mo: 2:1-6:6]: Changed directory to /tmp/omc_compile_ModelicaExternalC2_7UJy2p/BuildProjects/autotools\n\n[5] 13:32:08 Translation Notification\n[/home/marsj/tmp/a.mo: 2:1-6:6]: cp -a \"/home/marsj/tmp/Resources\"/* \"/tmp/omc_compile_ModelicaExternalC2_7UJy2p\"\n\n[6] 13:32:08 Translation Notification\n[/home/marsj/tmp/a.mo: 2:1-6:6]: Created directory /tmp/omc_compile_ModelicaExternalC2_7UJy2p\n```\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/1668"},"comment":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/comments/431589651","html_url":"https://github.com/tbeu/ModelicaSpecification/issues/571#issuecomment-431589651","issue_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/571","id":431589651,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTU4OTY1MQ==","user":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","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":"2018-10-20T15:08:42Z","updated_at":"2018-10-20T15:08:42Z","author_association":"COLLABORATOR","body":"**Modified by dietmarw on 27 Feb 2015 12:01 UTC**"}}
{"actor":{"display_login":"modelica-trac-importer"}}