{"action":"created","issue":{"url":"https://api.github.com/repos/AdaCore/gprbuild/issues/5","repository_url":"https://api.github.com/repos/AdaCore/gprbuild","labels_url":"https://api.github.com/repos/AdaCore/gprbuild/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/AdaCore/gprbuild/issues/5/comments","events_url":"https://api.github.com/repos/AdaCore/gprbuild/issues/5/events","html_url":"https://github.com/AdaCore/gprbuild/issues/5","id":157945859,"number":5,"title":"Problem with building relocatable libraries under FSF GCC","user":{"login":"simonjwright","id":1824512,"avatar_url":"https://avatars.githubusercontent.com/u/1824512?v=3","gravatar_id":"","url":"https://api.github.com/users/simonjwright","html_url":"https://github.com/simonjwright","followers_url":"https://api.github.com/users/simonjwright/followers","following_url":"https://api.github.com/users/simonjwright/following{/other_user}","gists_url":"https://api.github.com/users/simonjwright/gists{/gist_id}","starred_url":"https://api.github.com/users/simonjwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonjwright/subscriptions","organizations_url":"https://api.github.com/users/simonjwright/orgs","repos_url":"https://api.github.com/users/simonjwright/repos","events_url":"https://api.github.com/users/simonjwright/events{/privacy}","received_events_url":"https://api.github.com/users/simonjwright/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-01T16:05:00Z","updated_at":"2016-08-29T14:28:37Z","closed_at":"2016-08-29T14:28:37Z","body":"Building, for example, GNATCOLL under GCC 6.1.0 x86_64-apple-darwin15 results in\r\n```\r\n$ make\r\n====== Building relocatable libraries ======\r\ngprbuild -m -j0 -XLIBRARY_TYPE=relocatable -Pgnatcoll_build -p\r\ngcc -c -fPIC -O2 -gnatn -gnatws -gnat05 gnatcoll-xref-database_names.ads\r\ngcc -c -fPIC -O2 -gnatn -gnatws -gnat05 gnatcoll-xref-database.adb\r\ngcc -c -fPIC -O2 -gnatn -gnatws -gnat05 gnatcoll-xref.adb\r\ngprlib gnatcoll_sqlite.lexch\r\ng++ -dynamiclib -shared-libgcc -o /Users/simon/tmp/gnatcoll-gpl-2015-src/src/lib/sqlite/relocatable/libgnatcoll_sqlite.dylib.1.8w ... /Users/simon/tmp/gnatcoll-gpl-2015-src/src/obj/sqlite/relocatable/sqlite3.o ...\r\nld: library not found for -lgnat-6.1\r\ncollect2: error: ld returned 1 exit status\r\ngprlib: /opt/gcc-6.1.0/bin/g++ execution error\r\ngprbuild: could not build library for project gnatcoll_sqlite\r\nmake: *** [build_library_type/relocatable] Error 4\r\n```\r\nbecause, as built, `$prefix/lib/gcc/x86_64-apple-darwin15/6.1.0/adalib` contains\r\n```\r\n-rwxr-xr-x  1 root  admin   383616  5 May 11:10 libgnarl-6.dylib\r\nlrwxr-xr-x  1 root  admin       16  5 May 11:10 libgnarl.dylib -> libgnarl-6.dylib\r\n-rwxr-xr-x  1 root  admin  5165388  5 May 11:10 libgnat-6.dylib\r\nlrwxr-xr-x  1 root  admin       15  5 May 11:10 libgnat.dylib -> libgnat-6.dylib\r\n```\r\nI think this is because the [TOOLCHAIN VERSION] section of the .lexch file contains\r\n```\r\n[TOOLCHAIN VERSION]\r\nada\r\nGNAT 6.1\r\n```\r\nand gprlib.adb:1164 says\r\n\r\n                     Libgnat :=\r\n                       new String'\r\n                         (\"-lgnat-\" & Line (6 .. Last));\r\n                     Libgnarl :=\r\n                       new String'\r\n                         (\"-lgnarl-\" & Line (6 .. Last));\r\n\r\nI must say I don't understand why in this case it's necessary to alter Libgnat, Libgnarl at all?\r\n\r\nDo you think this is actually an FSF GCC issue?"},"comment":{"url":"https://api.github.com/repos/AdaCore/gprbuild/issues/comments/243140440","html_url":"https://github.com/AdaCore/gprbuild/issues/5#issuecomment-243140440","issue_url":"https://api.github.com/repos/AdaCore/gprbuild/issues/5","id":243140440,"user":{"login":"t-14","id":18482303,"avatar_url":"https://avatars.githubusercontent.com/u/18482303?v=3","gravatar_id":"","url":"https://api.github.com/users/t-14","html_url":"https://github.com/t-14","followers_url":"https://api.github.com/users/t-14/followers","following_url":"https://api.github.com/users/t-14/following{/other_user}","gists_url":"https://api.github.com/users/t-14/gists{/gist_id}","starred_url":"https://api.github.com/users/t-14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-14/subscriptions","organizations_url":"https://api.github.com/users/t-14/orgs","repos_url":"https://api.github.com/users/t-14/repos","events_url":"https://api.github.com/users/t-14/events{/privacy}","received_events_url":"https://api.github.com/users/t-14/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T14:28:37Z","updated_at":"2016-08-29T14:28:37Z","body":"This should now work as expected for any known flavor and version of gnat toolchains."}}
{"actor":{"display_login":"t-14"}}