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

Fix build issues #206

Merged
merged 15 commits into from
Oct 8, 2018
Merged

Fix build issues #206

merged 15 commits into from
Oct 8, 2018

Conversation

malbarbo
Copy link
Contributor

@malbarbo malbarbo commented Jul 2, 2018

This fixes almost all current build issues. Only two issues are left:

@malbarbo
Copy link
Contributor Author

malbarbo commented Jul 2, 2018

I think the remaining issues can be fixed later (or the support for the affect targets be removed).

Merging this PR will allows many of the queued PR to be tested and merged, so I think it is the away to go.

@Bobo1239
Copy link
Contributor

Just as a heads up: currently there are 7 failing targets with this PR (after one small patch for xargo). Fortunately only two underlying issues are causing this:

  1. During compilation of libgit2 (for cargo):
cargo:warning=libgit2/src/iterator.c: In function 'filesystem_iterator_set_current':
cargo:warning=libgit2/src/iterator.c:1464:43: error: 'struct stat' has no member named 'st_ctim'
cargo:warning=  iter->entry.ctime.nanoseconds = entry->st.st_ctime_nsec;
cargo:warning=                                           ^
cargo:warning=libgit2/src/iterator.c:1465:43: error: 'struct stat' has no member named 'st_mtim'
cargo:warning=  iter->entry.mtime.nanoseconds = entry->st.st_mtime_nsec;
cargo:warning=          
  1. During compilation of zlib (for cargo):
running: "sparcv9-sun-solaris2.10-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-I" "src/zlib" "-fvisibility=hidden" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/target/sparcv9-sun-solaris/debug/build/libz-sys-ae25cc32c0bf34bd/out/build/src/zlib/adler32.o" "-c" "src/zlib/adler32.c"
cargo:warning=In file included from /usr/local/sparcv9-sun-solaris2.10/usr/include/limits.h:38:0
cargo:warning=                 from /usr/local/lib/gcc/sparcv9-sun-solaris2.10/5.3.0/include-fixed/limits.h:168
cargo:warning=                 from /usr/local/lib/gcc/sparcv9-sun-solaris2.10/5.3.0/include-fixed/syslimits.h:7
cargo:warning=                 from /usr/local/lib/gcc/sparcv9-sun-solaris2.10/5.3.0/include-fixed/limits.h:34
cargo:warning=                 from src/zlib/zconf.h:418
cargo:warning=                 from src/zlib/zlib.h:34
cargo:warning=                 from src/zlib/zutil.h:22
cargo:warning=                 from src/zlib/adler32.c:8:
cargo:warning=/usr/local/lib/gcc/sparcv9-sun-solaris2.10/5.3.0/include-fixed/sys/feature_tests.h:408:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications 	and pre-2001 POSIX applications"
cargo:warning= #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
cargo:warning=  ^

Does somebody know how one could fix these?

@bgermann
Copy link
Contributor

bgermann commented Sep 20, 2018

I have fixed upstream:

  1. https://github.com/alexcrichton/git2-rs/pull/354
  2. Add define to build on Solaris rust-lang/libz-sys#42

@Bobo1239
Copy link
Contributor

https://travis-ci.org/Bobo1239/cross/builds/432241101
Down to two failures which now end with:

cargo:warning=libgit2/src/sysdir.c: In function 'get_passwd_home':
cargo:warning=libgit2/src/sysdir.c:55:11: error: too many arguments to function 'getpwuid_r'
cargo:warning=   error = getpwuid_r(uid, &pwd, buf, buflen, &pwdptr);
cargo:warning=           ^
cargo:warning=In file included from libgit2/src/sysdir.c:18:0:
cargo:warning=/usr/local/sparcv9-sun-solaris2.10/usr/include/pwd.h:166:23: note: declared here
cargo:warning= extern struct passwd *getpwuid_r(uid_t, struct passwd *, char *, int);
cargo:warning=                       ^
cargo:warning=libgit2/src/sysdir.c:55:9: warning: assignment makes integer from pointer without a cast [-Wint-conversion]
cargo:warning=   error = getpwuid_r(uid, &pwd, buf, buflen, &pwdptr);
cargo:warning=         ^

@bgermann I believe this should've been fixed by rust-lang/cmake-rs#45 (also see Bobo1239@6b5266b) and iirc this error did disappear back then. Any clue why it's resurfacing now?

@bgermann
Copy link
Contributor

bgermann commented Sep 24, 2018

alexcrichton/git2-rs@76f4b74 is the cause for the new failures.

Fix: https://github.com/alexcrichton/git2-rs/pull/356

@Bobo1239
Copy link
Contributor

https://travis-ci.org/Bobo1239/cross/builds/433072223 Everything's green now 🍾 (even x86_64-unknown-netbsd works) My branch only merged master and added two small commits.
Thanks @malbarbo and @bgermann for your efforts!
@malbarbo Can you add the two changes to this PR?
@Dylan-DPC @japaric Can we look into merging this after that?

Dylan-DPC-zz
Dylan-DPC-zz previously approved these changes Sep 25, 2018
@bgermann
Copy link
Contributor

What needs to be done to get this merged?

@Dylan-DPC-zz
Copy link

@bgermann would like @japaric or someone from rust-embedded team to review this as well. Waiting on that 👍

@ryankurte
Copy link

bors try

(I can't remember if bors is setup for this project, will try a local build later on if not)

bors bot added a commit that referenced this pull request Sep 27, 2018
@Bobo1239
Copy link
Contributor

Bobo1239 commented Sep 27, 2018

Do note that two (or atleast the first) commits have to be added before everything's green:

  1. Bobo1239@baad813
  2. Bobo1239@8db304d

@ryankurte
Copy link

Ahh, thanks! Is there any reason not to apply those over this PR so everything is green?
(Cc. @malbarbo or I can do it)

@bors
Copy link
Contributor

bors bot commented Sep 28, 2018

try

Build failed

@Dylan-DPC-zz
Copy link

@Bobo1239 possible but previous builds have worked fine. I think it is better to reduce the verbosity of the build first

@bors
Copy link
Contributor

bors bot commented Sep 29, 2018

Build failed

@Bobo1239
Copy link
Contributor

@Dylan-DPC Can you specify which previous builds you are referring to? It appears to me that previous builds were genuinely failing and before that (10 months ago) @japaric had the same issue. The last two green builds only became green after @ryankurte manually restarted the failing jobs. (Though the "bors try" run seems to have succeeded immediately.)

Regardless of that, reducing the verbosity of the build should be as easy as removing this line in ci/script.sh. @malbarbo Can you add a commit which does this and let @Dylan-DPC start a new run?

@Dylan-DPC-zz
Copy link

@Bobo1239 my bad. was probably thinking of some other repo. Yeah bors will fail even if we manually restart the builds on travis because it creates a new build.

With regards to the travis thing, i think it is better to do it in a separate PR. will do that change right now.

bors bot added a commit that referenced this pull request Sep 29, 2018
213: remove export to make CI process less verbose r=ryankurte a=Dylan-DPC

The bors builds are failing probably because of the verbosity of the build. Removing this as per [this comment](#206 (comment))

Co-authored-by: Dylan DPC <[email protected]>
@malbarbo
Copy link
Contributor Author

malbarbo commented Oct 4, 2018

@Dylan-DPC and @ryankurte I've added the python workaround. Please consider this pragmatic solution so we can move this forward.

@Dylan-DPC-zz
Copy link

@malbarbo thanks. The problem is we might not be able to merge it because it may still use the old configuration (at least on bors).

@ryankurte
Copy link

Thanks for that @Dylan-DPC, I guess we'll need to remove it when #213 lands.

bors retry

bors bot added a commit that referenced this pull request Oct 4, 2018
206: Fix build issues r=Dylan-DPC a=malbarbo

This fixes almost all current build issues.  Only two issues are left:

- thumb* tests, which requires using https://github.com/japaric/utest instead of https://github.com/japaric/cortest
- netbsd build, which is failing with libc linking issues

Co-authored-by: Marco A L Barbosa <[email protected]>
@Bobo1239
Copy link
Contributor

Bobo1239 commented Oct 4, 2018

Seems to have worked :D Unfortunately this run has another spurious issue:

fatal: unable to access 'https://github.com/rust-lang-nursery/compiler-builtins/': Could not resolve host: github.com

but I think this was just bad luck. Guess we'll need another run...

@Dylan-DPC-zz
Copy link

Yeah it is just a network error

@bors
Copy link
Contributor

bors bot commented Oct 4, 2018

Build failed

@Bobo1239
Copy link
Contributor

Bobo1239 commented Oct 5, 2018

@Dylan-DPC @ryankurte Can one of you start a (hopefully last) new run?

@Dylan-DPC-zz
Copy link

bors retry

@Dylan-DPC-zz
Copy link

bors: retry

@Bobo1239
Copy link
Contributor

Bobo1239 commented Oct 6, 2018

Seems that your message didn't reach bors?
bors ping

@bors
Copy link
Contributor

bors bot commented Oct 6, 2018

pong

@jamesmunns
Copy link
Contributor

bors retry

@bors
Copy link
Contributor

bors bot commented Oct 8, 2018

pong

@jamesmunns
Copy link
Contributor

bors r+ p=10

bors bot added a commit that referenced this pull request Oct 8, 2018
206: Fix build issues r=jamesmunns a=malbarbo

This fixes almost all current build issues.  Only two issues are left:

- thumb* tests, which requires using https://github.com/japaric/utest instead of https://github.com/japaric/cortest
- netbsd build, which is failing with libc linking issues

Co-authored-by: Marco A L Barbosa <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 8, 2018

Build succeeded

@bors bors bot merged commit e22a562 into cross-rs:master Oct 8, 2018
@malbarbo malbarbo deleted the fixes branch October 16, 2018 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants