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 for windows with CMake #16

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Conversation

saraedum
Copy link
Member

NTL provides zip file with some changes to its source code to make
Windows happy. However, they don't provide any build system but refer
people to some creative clicking in Visual Studio.

@conda-forge-linter

This comment has been minimized.

@saraedum

This comment has been minimized.

@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.

@saraedum

This comment has been minimized.

@conda-forge-linter

This comment has been minimized.

@saraedum
Copy link
Member Author

@isuruf: Any idea what I did wrong so that appveyor does not run anymore?

@isuruf isuruf closed this Jan 17, 2019
@isuruf isuruf reopened this Jan 17, 2019
@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.

@isuruf
Copy link
Member

isuruf commented Jan 17, 2019

@conda-forge-admin, please rerender

saraedum added a commit to saraedum/ntl-feedstock that referenced this pull request Jan 18, 2019
@saraedum
Copy link
Member Author

Thanks for the comments :)

@isuruf
Copy link
Member

isuruf commented Jan 18, 2019

include/NTL/config.h in the windows source archive disables gmp and gf2x. That files needs to be patched for NTL to use gmp and gf2x on windows for better performance.

@saraedum
Copy link
Member Author

I start to wonder whether we should actually use the Windows ZIP at all…

@saraedum
Copy link
Member Author

The Windows ZIP does not ship gmp_aux.h. So what does actually happen if we use the Unix tarball?

@saraedum
Copy link
Member Author

@isuruf: Do you understand the issue on macOS?

x86_64-apple-darwin13.4.0-clang++ -I../include -I.  -O2 -g -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -I$PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/ntl-11.3.2 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fno-common   -I$PREFIX/include  -o gen_gmp_aux gen_gmp_aux.cpp -L$PREFIX/lib  -lgmp  -lm
./gen_gmp_aux > ../include/NTL/gmp_aux.h 
dyld: Library not loaded: @rpath/libgmp.10.dylib
  Referenced from: /Users/travis/miniconda3/conda-bld/ntl_1547790604450/work/src/./gen_gmp_aux
  Reason: image not found

I added export DYLD_FALLBACK_LIBRARY_PATH="${PREFIX}/lib:${DYLD_FALLBACK_LIBRARY_PATH}" but this did not help.

@saraedum
Copy link
Member Author

@isuruf: Since I don't really know how this Windows stuff works. How would I tell the system where to find gmp.h?

Cannot open include file: 'gmp.h': No such file or directory

@isuruf
Copy link
Member

isuruf commented Jan 22, 2019

Use the cmake script,

cmake_minimum_required(VERSION 3.6)
project(ntl)

find_library(GMP_LIBRARY NAMES gmp)
find_path(GMP_INCLUDE_DIR NAMES gmp.h)

find_library(GF2X_LIBRARY NAMES gf2x)
find_path(GF2X_INCLUDE_DIR NAMES gf2x.h)

file(GLOB SOURCES src/*.cpp)
add_library(${PROJECT_NAME} SHARED ${SOURCES})
target_include_directories(ntl include ${GMP_INCLUDE_DIR} ${GF2X_INCLUDE_DIR})
target_link_libraries(ntl ${GMP_LIBRARY} ${GF2X_LIBRARY})

install(TARGETS ${PROJECT_NAME}
                RUNTIME DESTINATION bin
                ARCHIVE DESTINATION lib
                LIBRARY DESTINATION lib)
file(GLOB HEADERS include/NTL/*.h)
install(FILES ${HEADERS} DESTINATION include/NTL)

and add -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% to the cmake command line.

@isuruf
Copy link
Member

isuruf commented Jan 22, 2019

Btw, why not keep the CMakeLists.txt as a regular file in the recipe and copy it over? Changing it as a patch is more work.

…nda-forge-pinning 2024.01.05.22.51.09
@isuruf
Copy link
Member

isuruf commented Dec 6, 2024

@conda-forge-admin, rerender

…onda-forge-pinning 2024.12.05.23.59.20
@conda-forge-admin
Copy link
Contributor

conda-forge-admin commented Dec 6, 2024

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/meta.yaml) and found some lint.

Here's what I've got...

For recipe/meta.yaml:

For recipe/meta.yaml:

  • ℹ️ In conda-forge.yml: $.test_on_native_only = True.

    'Test On Native Only' is deprecated.
    This was used for disabling testing for cross-compiling.

    This has been deprecated in favor of the top-level `test` field.
    It is now mapped to `test: native_and_emulated`.
    
    Schema
    {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": false,
      "deprecated": true,
      "title": "Test On Native Only"
    }

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12200640822. Examine the logs at this URL for more detail.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@isuruf
Copy link
Member

isuruf commented Dec 6, 2024

@conda-forge-admin, rerender

conda-forge-webservices[bot] and others added 4 commits December 6, 2024 14:34
…onda-forge-pinning 2024.12.06.08.06.51
@isuruf
Copy link
Member

isuruf commented Dec 6, 2024

@conda-forge-admin rerender

@isuruf
Copy link
Member

isuruf commented Dec 6, 2024

@conda-forge-admin rerender

@conda-forge-admin
Copy link
Contributor

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/meta.yaml) and found it was in an excellent condition.

@conda-forge-admin
Copy link
Contributor

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

I failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint --conda-forge . from the recipe directory. You can also examine the workflow logs for more detail.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12200819769. Examine the logs at this URL for more detail.

…onda-forge-pinning 2024.12.06.08.06.51
@conda-forge-admin
Copy link
Contributor

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/meta.yaml) and found it was in an excellent condition.

@isuruf
Copy link
Member

isuruf commented Dec 6, 2024

Static libraries are built fine now. One test failure though.

@tobiasdiez
Copy link

Would it be perhaps possible to patch this one failing test for now? An imperfect build is still better than no build, in my book ;)

@isuruf
Copy link
Member

isuruf commented Jan 12, 2025

@conda-forge-admin rerender

@conda-forge-admin
Copy link
Contributor

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

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12733063721. Examine the logs at this URL for more detail.

@isuruf isuruf closed this Jan 12, 2025
@isuruf isuruf reopened this Jan 12, 2025
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.

None yet

5 participants