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

update with prefix and ".a" #12

Closed
wants to merge 2 commits into from
Closed

Conversation

delabj
Copy link

@delabj delabj commented Nov 30, 2020

Following the example in r-rust/hellorust#9

I added a lib prefix and a .a suffix to the STATLIB line

@clauswilke
Copy link
Owner

Thanks! The AppVeyor build is still failing, though. Could you see if you can figure out what's going wrong? Does this work for you locally?

@delabj
Copy link
Author

delabj commented Nov 30, 2020

I'm able to get further than I could before, but I'm getting a new error

error: expected `;`
  --> src\style\properties\definitions.rs:82:30
   |
82 |         "margin" => FourSides<SpecifiedLengthOrPercentageOrAuto> {
   |                              ^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

@clauswilke
Copy link
Owner

Ah, that's actually a problem with the Rust code. Some of the libraries I'm depending on may have changed and it'll require some modification to the code or explicitly using an older version. Unfortunately this isn't going to be an easy fix most likely. I'll take on this project again at some point but right now I'm focusing on better R-Rust interoperability in general.

@delabj
Copy link
Author

delabj commented Nov 30, 2020

Makes sense. I'm excited to see where R-Rust goes!

@clauswilke
Copy link
Owner

I just committed by Cargo.lock file. This should allow you to build the project. Merge in master and see what happens.

@delabj
Copy link
Author

delabj commented Dec 1, 2020

I got further, but I've been compiling unicase v2.6.0 for about 40 minutes so something may not be working.

@clauswilke
Copy link
Owner

Yeah, that doesn't sound right. The entire build takes maybe 2-3 min on my laptop. The CI builds also still fail. I'll have to investigate more.

@clauswilke
Copy link
Owner

On AppVeyor, the error message is:

C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_eh
          collect2.exe: error: ld returned 1 exit status      

That looks like a problem in the toolchain, possibly with Rtools.

On Travis, the build breaks because textshaping can't be installed from CRAN. This has nothing to do with my code and is just a reflection of a broken Travis setup. I'll probably have to set up github actions to see if something is fundamentally broken.

@clauswilke
Copy link
Owner

So the compile error you saw earlier seems correct. I'm getting it on a clean build on ubuntu 20.4 also:
https://github.com/clauswilke/sinab/runs/1478056367#step:10:210

I suspect something has changed in the latest version of rustc. My local one is a few months old, and there were some changes introduced that recently that may break some macros. I'll have to see how easy it is to fix.

@clauswilke
Copy link
Owner

Ok, I fixed the issue in the rust code related to the latest changes in rustc. That lets me build sinab on ubuntu. However, it still doesn't build on Windows, for some unrelated linking issue. I've opened an issue: #13

I'll close this PR, as I've already added this change into the code:

STATLIB = $(LIBDIR)/libsinab.a

It's not the reason why the Windows build won't succeed.

@clauswilke clauswilke closed this Dec 1, 2020
@delabj delabj deleted the patch-1 branch December 1, 2020 12:15
@clauswilke
Copy link
Owner

Just an FYI: The latest code base does compile on Windows, just not on AppVeyor:
#13 (comment)

Maybe try your local build one more time.

@delabj
Copy link
Author

delabj commented Dec 3, 2020

As an update, I was unable to get it to work on my main machine. But this could just be a bad Rust set up.

@clauswilke
Copy link
Owner

Could you describe the problem? Was it also the missing gcc_eh library as on the AppVeyor runs?

@clauswilke
Copy link
Owner

clauswilke commented Dec 18, 2020

@delabj FYI, I've learned a lot about building rust apps on windows lately. If your default host is x86_64-pc-windows-gnu (which the Sinab documentation currently recommends) your build is likely going to fail. Make the default host x86_64-pc-windows-msvc instead:

rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain stable

This has fixed all sorts of build problems for the extendr project.

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.

2 participants