Giter VIP home page Giter VIP logo

Comments (9)

msarahan avatar msarahan commented on July 4, 2024

It's a lot simpler here. Just use conda-build 3. Since the compiler packages that it uses are all self-contained with their own sysroots, it's just a matter of letting the compiler packages work their magic.

The only real trick to this is that you should issue build commands from the root of the aggregate folder, where conda_build_config.yaml lives, or manually specify an alternate conda_build_config.yaml file that conda-build should use. That's the -m flag to conda-build.

we'll try to write up some docs soon, too.

from aggregate.

183amir avatar 183amir commented on July 4, 2024

This is not working for me. For example take this recipe:

{% set version = "1.0.0.1832.f7e6fca" %}

package:
  name: libblitz
  version: {{ version }}

source:
  git_url: https://github.com/wperkins/blitz.git
  git_rev: f7e6fca9ad683db7c0a41c250db346ccae6732c3

build:
  number: 0
  run_exports:
    - {{ pin_subpackage('libblitz') }}

requirements:
  build:
    - python 2
    - autoconf
    - automake
    - libtool
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}

test:
  commands:
    - test -d $PREFIX/include/blitz        # [unix]
    - test -e $PREFIX/lib/libblitz.a       # [unix]
    - test -e $PREFIX/lib/libblitz.so      # [linux]
    - test -e $PREFIX/lib/libblitz.dylib   # [osx]

about:
  home: https://sourceforge.net/projects/blitz
  license: LGPL 3
  summary: A C++ class library for scientific computing which provides performance on par with Fortran 77/90

with this build.sh:

#!/bin/bash

if [[ $ARCH == 64 ]];
then
	export ARCH_CMD="--enable-64bit"
else
	export ARCH_CMD="--enable-simd-width=8"
fi

autoreconf -vif

./configure \
  --prefix="${PREFIX}" \
  --enable-static \
  --enable-shared \
  --enable-optimize \
  --enable-threadsafe \
  --enable-serialization \
  ${ARCH_CMD} \
  CPPFLAGS="-I${PREFIX}/include -pthread" \
  CFLAGS="-I${PREFIX}/include -pthread -DBZHAVE_STD" \
  CXXFLAGS="-I${PREFIX}/include -pthread -DBZHAVE_STD" \
  LDFLAGS="-L${PREFIX}/lib"
make
make check
make install

This recipe compiles fine on the conda-concourse-ci docker image but on my laptop which has Arch Linux it fails with the following error:

libtool: compile:  /home/amir/miniconda/conda-bld/libblitz_1507017058039/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/x86_64-conda_cos6-linux-gnu-c++ -DHAVE_CONFIG_H -I.. -I.. -I/usr/include -I/home/amir/miniconda/conda-bld/libblitz_1507017058039/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include -pthread -O3 -funroll-loops -fstrict-aliasing -fomit-frame-pointer -ffast-math -DUSE_LIBBLAS -MT globals.lo -MD -MP -MF .deps/globals.Tpo -c ../src/globals.cpp  -fPIC -DPIC -o .libs/globals.o
In file included from /home/amir/miniconda/conda-bld/libblitz_1507017058039/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/math.h:47:0,
                 from /home/amir/miniconda/conda-bld/libblitz_1507017058039/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/x86_64-conda_cos6-linux-gnu/include/c++/7.2.0/cmath:45,
                 from ../blitz/blitz.h:65,
                 from ../src/globals.cpp:11:
/usr/include/bits/mathdef.h:19:3: error: #error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
 # error "Never use <bits/mathdef.h> directly; include <complex.h> instead"
   ^~~~~

Here is the full log.

from aggregate.

msarahan avatar msarahan commented on July 4, 2024

Without looking at source (on my phone on a bus), that appears to come from a preprocessor definition that is getting triggered differently in either build environment. You may need to change the preprocessor condition to be compiler-specific rather than platform-specific?

from aggregate.

183amir avatar 183amir commented on July 4, 2024

I think this error is related to boost. I did not know blitz needs boost for compilation! In my log I see a warning like configure: WARNING: BOOST_CPPFLAGS -I/usr/include which seems to be the problem. Unfortunately a new boost package with the new C++ ABI is not released yet so I cannot fully test this with the new compilers.

from aggregate.

msarahan avatar msarahan commented on July 4, 2024

sorry about that. We'll try to build out more packages very soon.

from aggregate.

mingwandroid avatar mingwandroid commented on July 4, 2024

@183amir, boost packages with the new C++ ABI are released now. Please close if everything is OK.

from aggregate.

183amir avatar 183amir commented on July 4, 2024

Hi @mingwandroid I will test this again and report back. It would best however to update the readme to mention that conda build 3 needs to be used.

from aggregate.

mingwandroid avatar mingwandroid commented on July 4, 2024

I don't think that's necessary. Using the latest features in recipes is always going to require the latest conda-build and updating conda-build is always a good idea anyway.

from aggregate.

183amir avatar 183amir commented on July 4, 2024

The recipe of libblitz (posted above) fails for me on both archlinux and the continuumio/conda-concourse-ci docker image now with boost 1.65.1 from the main channel. But I am not getting the old error anymore which means something got fixed at least using the new boost.
Since the blitz++ issue may not be related to the issue here, I will close this issue.
Here is the build log and the configure script if you are interested.

Thank you for your work on conda-build-3 and the compiler packages.

from aggregate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.