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

Build both static and shared libraries on Unix and Windows platforms #15

Merged
merged 14 commits into from
Oct 7, 2018

Conversation

wesm
Copy link
Member

@wesm wesm commented Sep 27, 2018

Checklist

  • [x ] Used a fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)

Close #10, #13

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@wesm
Copy link
Member Author

wesm commented Sep 27, 2018

@conda-forge-admin, please rerender

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-webservice.

I tried to re-render for you, but it looks like there was nothing to do.

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@scopatz
Copy link
Member

scopatz commented Sep 27, 2018

Thanks for putting this in @wesm! Any interest in adding yourself as a maintainer here? I think you probably care about this package more than some of the current maintainers 😉

@wesm
Copy link
Member Author

wesm commented Sep 27, 2018

Done, I added @pitrou @xhochy and @kszucs as maintainers

@isuruf
Copy link
Member

isuruf commented Sep 27, 2018

Does this close #10? Windows is still disabled

@scopatz
Copy link
Member

scopatz commented Sep 27, 2018

No this doesn't seem to enable #10

@wesm
Copy link
Member Author

wesm commented Sep 27, 2018

Oh let me try to enable it then

@scopatz
Copy link
Member

scopatz commented Sep 27, 2018

To be clear, you'll need to remove the win selector here and then rerender

@wesm
Copy link
Member Author

wesm commented Sep 27, 2018

@conda-forge-admin, please rerender

@scopatz
Copy link
Member

scopatz commented Sep 28, 2018

Looks like the windows builds fail with:

Setting environment for using Microsoft Visual Studio 2008 x64 tools.
-- The CXX compiler identification is MSVC 15.0.30729.1
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:26 (message):
  you need Visual Studio 2015 or later

@wesm
Copy link
Member Author

wesm commented Sep 28, 2018

OK, so Python 3.5 or later I guess. I'll have to look into it later, if someone wants to push changes here please go ahead

@scopatz
Copy link
Member

scopatz commented Sep 28, 2018

Note, that we are about to drop explicit support for python v3.5 if that helps!

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

  • The requirements section contained an unexpected subsection name. skip is not a valid subsection name.

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

@conda-forge-admin, please rerender

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

@conda-forge-admin, please rerender

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

@scopatz is this the right windows skip clause?

  skip: true  # [win and (py36 or vc<14)]

@scopatz
Copy link
Member

scopatz commented Oct 2, 2018

@wesm - what are you trying to skip? That looks like it is going to skip all versions of windows, effectively

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

I tried to follow this C library pattern:

https://github.com/conda-forge/brotli-feedstock/blob/master/recipe/meta.yaml#L14

I guess that's not right. I'm copying the recipe from arrow-cpp-feedstock now (another C++11-only library)

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

@conda-forge-admin, please rerender

@scopatz
Copy link
Member

scopatz commented Oct 2, 2018

What you have now looks more correct. I am not a deep windows build expert, so you might want to ask on gitter, but if this works and passes, I'll merge it

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

👍

@scopatz
Copy link
Member

scopatz commented Oct 2, 2018

Looks like the windows build failed 😢

[ 31%] Building CXX object CMakeFiles/re2.dir/util/rune.cc.obj
rune.cc
[ 32%] Building CXX object CMakeFiles/re2.dir/util/strutil.cc.obj
strutil.cc
[ 33%] Linking CXX shared library re2.dll
NMAKE : fatal error U1077: 'C:\bld\re2_1538510221475\_build_env\Library\bin\cmake.exe' : return code '0xc0000005'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
Traceback (most recent call last):
  File "C:\Miniconda36-x64\Scripts\conda-build-script.py", line 10, in <module>

@wesm
Copy link
Member Author

wesm commented Oct 2, 2018

Hm. Guess we should try the normal MSVC build

@isuruf
Copy link
Member

isuruf commented Oct 2, 2018

@wesm
Copy link
Member Author

wesm commented Oct 4, 2018

Appears to be building now. What's this all about?

The system cannot find the path specified.
Traceback (most recent call last):
  File "C:\Miniconda36-x64\Scripts\conda-build-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\cli\main_build.py", line 438, in main
    execute(sys.argv[1:])
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\cli\main_build.py", line 429, in execute
    verify=args.verify)
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\api.py", line 201, in build
    notest=notest, need_source_download=need_source_download, variants=variants)
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\build.py", line 2204, in build_tree
    notest=notest,
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\build.py", line 1394, in build
    windows.build(m, build_file, stats=build_stats)
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\windows.py", line 316, in build
    check_call_env(cmd, cwd=src_dir, stats=stats)
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\utils.py", line 313, in check_call_env
    return _func_defaulting_env_to_os_environ('call', *popenargs, **kwargs)
  File "C:\Miniconda36-x64\lib\site-packages\conda_build\utils.py", line 293, in _func_defaulting_env_to_os_environ
    raise subprocess.CalledProcessError(proc.returncode, _args)
subprocess.CalledProcessError: Command '['cmd.exe', '/c', 'bld.bat']' returned non-zero exit status 1.
Command exited with code 1

@scopatz
Copy link
Member

scopatz commented Oct 4, 2018

That seems odd, perhaps a conda-build issue. Maybe bring it up on the gitter or conda-build

recipe/bld.bat Outdated
nmake
if errorlevel 1 exit 1

copy Release\re2.lib %LIBRARY_DIR%\re2_static.lib
Copy link
Member

Choose a reason for hiding this comment

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

LIBRARY_DIR -> LIBRARY_LIB

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@wesm
Copy link
Member Author

wesm commented Oct 5, 2018

Ideas?


nmake
if errorlevel 1 exit 1

Copy link
Member

Choose a reason for hiding this comment

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

You are not doing an nmake install here, not sure if that is needed.

Copy link
Member Author

@wesm wesm Oct 5, 2018

Choose a reason for hiding this comment

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

Can't do that because it would clobber the DLL import lib re2.lib

Copy link
Member

Choose a reason for hiding this comment

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

Ahh Ok, that makes sense. Is there a way we could turn echo on, so that we can see what is actually being run?

@wesm
Copy link
Member Author

wesm commented Oct 6, 2018

OK, adding echo shows what's wrong:

(C:\bld\re2_1538829964940\_build_env) C:\bld\re2_1538829964940\work\cmake-build>copy Release\re2.lib C:\bld\re2_1538829964940\_h_env\Library\lib\re2_static.lib 
The system cannot find the path specified.
(C:\bld\re2_1538829964940\_build_env) C:\bld\re2_1538829964940\work\cmake-build>if errorlevel 1 exit 1 

I will fix and then merge once it's working

@wesm
Copy link
Member Author

wesm commented Oct 7, 2018

@scopatz can you merge this? Thanks!

@scopatz scopatz merged commit 92f1133 into conda-forge:master Oct 7, 2018
@scopatz
Copy link
Member

scopatz commented Oct 7, 2018

Glad to see this working!

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.

Build on Windows
5 participants