Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[elfutils] add new port #14771

Merged
merged 8 commits into from Dec 1, 2020
Merged

[elfutils] add new port #14771

merged 8 commits into from Dec 1, 2020

Conversation

Neumann-A
Copy link
Contributor

new port; required for mesa on linux

@PhoebeHui PhoebeHui added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Nov 26, 2020
@PhoebeHui
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PhoebeHui
Copy link
Contributor

elfutils:x64-osx failed in git fetch steps, this issue could repro on local machine, @Neumann-A , could you help have a look?

git-fetch-x64-osx-err.log

error: Server does not allow request for unadvertised object b503c358dde835d8a1ae3ebd4968755ff396f814
-- Fetching https://sourceware.org/git/elfutils...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:106 (message):
    Command failed: /usr/bin/git fetch https://sourceware.org/git/elfutils b503c358dde835d8a1ae3ebd4968755ff396f814 --depth 1 -n
    Working Directory: /Users/vagrant/Data/downloads/git-tmp
    Error code: 128
    See logs for more information:
      /Users/vagrant/Data/buildtrees/elfutils/git-fetch-x64-osx-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_from_git.cmake:78 (vcpkg_execute_required_process)
  ports/elfutils/portfile.cmake:1 (vcpkg_from_git)
  scripts/ports.cmake:136 (include)

Copy link
Contributor

@PhoebeHui PhoebeHui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried the hash for the tag https://sourceware.org/git/?p=elfutils.git;a=tag;h=25d048684a82f9ba701c6939b7f28c3543bb7991, the git fetch works, it failed in config steps:

configure: WARNING: unrecognized options: --disable-shared, --enable-static
rm: conftest.dSYM: is a directory
configure: error: gcc with GNU99 support required

ports/elfutils/portfile.cmake Outdated Show resolved Hide resolved
Co-authored-by: Phoebe <20694052+PhoebeHui@users.noreply.github.com>
@Neumann-A
Copy link
Contributor Author

configure: error: gcc with GNU99 support required

which version of gcc? Or what is the output of the config.log in the subdir <triplet>-dbg/?

@PhoebeHui
Copy link
Contributor

Here is config log:
failure logs for x64-osx (1).zip

@Neumann-A
Copy link
Contributor Author

@PhoebeHui: That are not the logs I need. I need the literally called config.log from <vcpkgroot>/buildtrees/<port>/<triplet>-<shortbuildtype>/config.log Unfortunally vcpkg_configure_make is not able to copy that file into buildtrees/<port> since vcpkg_execute_process does error before I can inject the code for copying that file one folder down.

@PhoebeHui
Copy link
Contributor

Sorry, here is correct one:
config.log

@Neumann-A
Copy link
Contributor Author

The error is:

configure:5165: gcc -c -fPIC -g -std=gnu99  conftest.c >&5
conftest.c:20:28: error: function definition is not allowed here
  double square (double z) { return z * z; }
                           ^
conftest.c:21:10: error: implicit declaration of function 'square' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  return square (a) + square (b);
         ^
conftest.c:26:18: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
  struct S { int x[n]; };
                 ^
3 errors generated.
configure:5165: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "elfutils"
| #define PACKAGE_TARNAME "elfutils"
| #define PACKAGE_VERSION "0.182"
| #define PACKAGE_STRING "elfutils 0.182"
| #define PACKAGE_BUGREPORT "https://sourceware.org/bugzilla"
| #define PACKAGE_URL "http://elfutils.org/"
| #define PACKAGE "elfutils"
| #define VERSION "0.182"
| #define DEFAULT_AR_DETERMINISTIC false
| #define YYTEXT_POINTER 1
| /* end confdefs.h.  */
| int foo (int a)
| {
|   for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;
| }
|
| double bar (double a, double b)
| {
|   double square (double z) { return z * z; }
|   return square (a) + square (b);
| }
|
| void baz (int n)
| {
|   struct S { int x[n]; };
| }
configure:5173: result: no
configure:5176: error: gcc with GNU99 support required

which basically means that the compiler:

configure:3750: gcc --version >&5
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1

does not support gnu extensions (-std=gnu99). As such I should probably put it on the CI skiplist on OSX? If a true gcc would be used on OSX it would probably compile.

@PhoebeHui
Copy link
Contributor

Could you please add it to 'Supports" instead?

@Neumann-A
Copy link
Contributor Author

@PhoebeHui: Supports seems wrong here. A custom toolchain switching to gcc on apple could compile this correctly.

@PhoebeHui
Copy link
Contributor

PhoebeHui commented Dec 1, 2020

@Neumann-A, thanks for the information!

I'm fine to put it on the CI skiplist on OSX, could add comments as well to ci.baseline.txt file?

@PhoebeHui PhoebeHui added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Dec 1, 2020
@strega-nil strega-nil merged commit 00553d0 into microsoft:master Dec 1, 2020
@strega-nil
Copy link
Contributor

Thanks @Neumann-A :)

@Neumann-A Neumann-A deleted the add_elfutils branch December 1, 2020 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants