Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chico Lustosa
    @chicolustosa_twitter

    Just to show you:
    $ bash build.sh
    -- The C compiler identification is GNU 6.4.0
    -- The CXX compiler identification is GNU 6.4.0
    CMake Warning at /usr/share/cmake-3.3.2/Modules/Platform/CYGWIN.cmake:15 (message):
    CMake no longer defines WIN32 on Cygwin!

    (1) If you are just trying to build this project, ignore this warning or
    quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
    the CMake cache. If later configuration or build errors occur then this
    project may have been written under the assumption that Cygwin is WIN32.
    In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

    (2) If you are developing this project, add the line

    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required

    at the top of your top-level CMakeLists.txt file or set the minimum
    required version of CMake to 2.8.4 or higher. Then teach your project to
    build on Cygwin without WIN32.
    Call Stack (most recent call first):
    /usr/share/cmake-3.3.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
    CMakeLists.txt:11 (project)

    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++.exe
    -- Check for working CXX compiler: /usr/bin/c++.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- The Fortran compiler identification is unknown
    CMake Error at CMakeLists.txt:26 (enable_language):
    No CMAKE_Fortran_COMPILER could be found.

    Tell CMake where to find the compiler by setting either the environment
    variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
    path to the compiler, or to the compiler name if it is in the PATH.

    -- Configuring incomplete, errors occurred!

    Joey Dumont
    @joeydumont
    Show me your build.sh.
    It seems like you forgot to put a space between gcc\fortran and ...
    Chico Lustosa
    @chicolustosa_twitter
    Yep, I did. Now it skips directly for the fortran error.

    the build.sh : #!/bin/bash

    ---------------------------------------------------------------------------

    Author: Joey Dumont joey.dumont@gmail.com

    Author: Denis Gagnon gagnon88@gmail.com

    Date: 2015-02-26

    Description: Compiles and builds complex_bessel

    ----------------------------------------------------------------------------

    -----------------------------------------

    This script simply calls CMake from the

    build directory and compiles the library.

    #

    Usage: bash build.sh {make_arg}

    -----------------------------------------

    Change to file directory.

    cd "$(dirname "$(realpath "$0")")";

    Check if build/ dir exists.

    if [ ! -d build ]; then
    mkdir build
    fi

    Change to build dir and compile the library.

    cd build
    cmake cmake FC=C:\cygwin64\home\Chico\gcc-7.2.0\gcc\fortran ..
    make $1

    and the message: $ bash build.sh
    CMake Warning at /usr/share/cmake-3.3.2/Modules/Platform/CYGWIN.cmake:15 (message):
    CMake no longer defines WIN32 on Cygwin!

    (1) If you are just trying to build this project, ignore this warning or
    quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
    the CMake cache. If later configuration or build errors occur then this
    project may have been written under the assumption that Cygwin is WIN32.
    In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

    (2) If you are developing this project, add the line

    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required

    at the top of your top-level CMakeLists.txt file or set the minimum
    required version of CMake to 2.8.4 or higher. Then teach your project to
    build on Cygwin without WIN32.
    Call Stack (most recent call first):
    /usr/share/cmake-3.3.2/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
    CMakeLists.txt:11 (project)

    -- The Fortran compiler identification is unknown
    CMake Error at CMakeLists.txt:26 (enable_language):
    No CMAKE_Fortran_COMPILER could be found.

    Tell CMake where to find the compiler by setting either the environment
    variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
    path to the compiler, or to the compiler name if it is in the PATH.

    -- Configuring incomplete, errors occurred!
    See also "/home/Chico/complex_bessel-release-0.6/build/CMakeFiles/CMakeOutput.log".
    See also "/home/Chico/complex_bessel-release-0.6/build/CMakeFiles/CMakeError.log".

    Joey Dumont
    @joeydumont
    You can use Github-flavoured Markdown in this chat. It would made reading those messages easier if you wrapped them with "```".
    You are running cmake twice for some reason. The line should be cmake FC=C:\cygwin64\home\Chico\gcc-7.2.0\gcc\fortran ...
    Chico Lustosa
    @chicolustosa_twitter
    Sorry. Same thing happens. I am trying to find out if my fortran compiler is properly set up.
    I mean, same thing happens when I change the line.
    Joey Dumont
    @joeydumont
    I guess you could try reinstalling gfortran.
    I'll try compiling under cygwin when I have access to a Windows machine, probably a couple days from now.
    Chico Lustosa
    @chicolustosa_twitter
    Thank you, I will do that meanwhile.
    Chico Lustosa
    @chicolustosa_twitter
    Hello, I finally was able to install the library after reinstalling the fortran compiler. But the fortran linking is not working for some reason.
    Joey Dumont
    @joeydumont
    What do you mean?
    Chico Lustosa
    @chicolustosa_twitter
    I am trying to send the code marked as you asked but it doesn't seem to work, sorry, here it goes
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9 sp_bessel7besselJEdSt7complexIdE]+0xf9): undefined reference tozbesj_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9 sp_bessel7besselJEdSt7complexIdE]+0xf9): relocation truncated to fit: R_X86_64_P C32 against undefined symbol zbesj_wrap' /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9 sp_bessel7besselJEdSt7complexIdE]+0x226): undefined reference tozbesy_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9 sp_bessel7besselJEdSt7complexIdE]+0x226): relocation truncated to fit: R_X8664 PC32 against undefined symbol zbesy_wrap' /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9 sp_bessel7besselYEdSt7complexIdE]+0x10b): undefined reference tozbesy_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9 sp_bessel7besselYEdSt7complexIdE]+0x10b): relocation truncated to fit: R_X8664 PC32 against undefined symbol zbesy_wrap' /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9 sp_bessel7besselYEdSt7complexIdE]+0x226): undefined reference tozbesj_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9 sp_bessel7besselYEdSt7complexIdE]+0x226): relocation truncated to fit: R_X8664 PC32 against undefined symbol zbesj_wrap' collect2: error: ld returned 1 exit status
    Joey Dumont
    @joeydumont
    Check the Markdown help in the bottom right corner of the chat box.
    Chico Lustosa
    @chicolustosa_twitter
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9                                 sp_bessel7besselJEdSt7complexIdE]+0xf9): undefined reference to `zbesj_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9                                 sp_bessel7besselJEdSt7complexIdE]+0xf9): relocation truncated to fit: R_X86_64_P                                 C32 against undefined symbol `zbesj_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9                                 sp_bessel7besselJEdSt7complexIdE]+0x226): undefined reference to `zbesy_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9                                 sp_bessel7besselJEdSt7complexIdE]+0x226): relocation truncated to fit: R_X86_64_                                 PC32 against undefined symbol `zbesy_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9                                 sp_bessel7besselYEdSt7complexIdE]+0x10b): undefined reference to `zbesy_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9                                 sp_bessel7besselYEdSt7complexIdE]+0x10b): relocation truncated to fit: R_X86_64_                                 PC32 against undefined symbol `zbesy_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9                                 sp_bessel7besselYEdSt7complexIdE]+0x226): undefined reference to `zbesj_wrap'
    /tmp/ccGocnXj.o:besseltests.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9                                 sp_bessel7besselYEdSt7complexIdE]+0x226): relocation truncated to fit: R_X86_64_                                 PC32 against undefined symbol `zbesj_wrap'
    collect2: error: ld returned 1 exit status
    Joey Dumont
    @joeydumont
    You're trying to compile your own besseltests.cpp file?
    Chico Lustosa
    @chicolustosa_twitter
    Yes, but I tryed with the tests you provided also.
    the simpleTest.cpp file, for example.
    g++ simpleTest.cpp -o besseltest.exe
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9sp_bessel7besselJEdSt7complexIdE]+0xf9): undefined reference to `zbesj_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9sp_bessel7besselJEdSt7complexIdE]+0xf9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesj_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9sp_bessel7besselJEdSt7complexIdE]+0x226): undefined reference to `zbesy_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselJEdSt7complexIdE[_ZN9sp_bessel7besselJEdSt7complexIdE]+0x226): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesy_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9sp_bessel7besselYEdSt7complexIdE]+0x10b): undefined reference to `zbesy_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9sp_bessel7besselYEdSt7complexIdE]+0x10b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesy_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9sp_bessel7besselYEdSt7complexIdE]+0x226): undefined reference to `zbesj_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselYEdSt7complexIdE[_ZN9sp_bessel7besselYEdSt7complexIdE]+0x226): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesj_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselKEdSt7complexIdE[_ZN9sp_bessel7besselKEdSt7complexIdE]+0xd3): undefined reference to `zbesk_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel7besselKEdSt7complexIdE[_ZN9sp_bessel7besselKEdSt7complexIdE]+0xd3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesk_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel8hankelH1EdSt7complexIdE[_ZN9sp_bessel8hankelH1EdSt7complexIdE]+0xea): undefined reference to `zbesh_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel8hankelH1EdSt7complexIdE[_ZN9sp_bessel8hankelH1EdSt7complexIdE]+0xea): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesh_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel8hankelH2EdSt7complexIdE[_ZN9sp_bessel8hankelH2EdSt7complexIdE]+0xea): undefined reference to `zbesh_wrap'
    /tmp/ccS88gFq.o:simpleTest.cpp:(.text$_ZN9sp_bessel8hankelH2EdSt7complexIdE[_ZN9sp_bessel8hankelH2EdSt7complexIdE]+0xea): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesh_wrap'
    collect2: error: ld returned 1 exit status
    Joey Dumont
    @joeydumont
    Try adding -fPIC to lines 27-28 of CMakeLists.txt, recompile the library and try to compile the examples again.
    Chico Lustosa
    @chicolustosa_twitter
    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fPIC -Wall -march=native") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fPIC -Wall -march=native -std=c++11")
    like that?
    Joey Dumont
    @joeydumont
    Yes.
    Chico Lustosa
    @chicolustosa_twitter
    No change..
    can this be related to a doxygen file? when I run the build command it appears a message saying there is no doxugen executable.
    
    -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/Chico/complex_bessel-release-0.6/build
    [100%] Built target complex_bessel
    make install
    [100%] Built target complex_bessel
    Install the project...
    -- Install configuration: ""
    -- Up-to-date: /usr/local/lib/libcomplex_bessel.dll.a
    -- Up-to-date: /usr/local/lib/cygcomplex_bessel-0.6.0.dll
    -- Up-to-date: /usr/local/include
    -- Up-to-date: /usr/local/include/complex_bessel.h
    -- Up-to-date: /usr/local/include/complex_bessel_bits
    -- Up-to-date: /usr/local/include/complex_bessel_bits/besselFunctions.h
    -- Up-to-date: /usr/local/include/complex_bessel_bits/fortranLinkage.h
    -- Up-to-date: /usr/local/include/complex_bessel_bits/sph_besselFunctions.h
    -- Up-to-date: /usr/local/include/complex_bessel_bits/utilities.h
    Joey Dumont
    @joeydumont
    Are you sure you recompiled the library? This output suggests cmake didn't do anything.
    No, it cannot be related to Doxygen. This simply builds the documentation.
    Remove the build directory and rerun bash build.sh.
    Chico Lustosa
    @chicolustosa_twitter
    Okay, did that now. The library was recompiled
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++.exe
    -- Check for working CXX compiler: /usr/bin/c++.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- The Fortran compiler identification is GNU 6.4.0
    -- Check for working Fortran compiler: /usr/bin/gfortran.exe
    -- Check for working Fortran compiler: /usr/bin/gfortran.exe  -- works
    -- Detecting Fortran compiler ABI info
    -- Detecting Fortran compiler ABI info - done
    -- Checking whether /usr/bin/gfortran.exe supports Fortran 90
    -- Checking whether /usr/bin/gfortran.exe supports Fortran 90 -- yes
    -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/Chico/complex_bessel-release-0.6/build
    Scanning dependencies of target complex_bessel
    [ 25%] Building Fortran object CMakeFiles/complex_bessel.dir/src/amos_iso_c_fortran_wrapper.f90.o
    [ 50%] Building Fortran object CMakeFiles/complex_bessel.dir/src/zbesh.for.o
    [ 75%] Building Fortran object CMakeFiles/complex_bessel.dir/src/machine.for.o
    [100%] Linking Fortran shared library cygcomplex_bessel-0.6.0.dll
    [100%] Built target complex_bessel
    and reinstalled
    make install
    [100%] Built target complex_bessel
    Install the project...
    -- Install configuration: ""
    -- Installing: /usr/lib/libcomplex_bessel.dll.a
    -- Installing: /usr/lib/cygcomplex_bessel-0.6.0.dll
    -- Up-to-date: /usr/include
    -- Up-to-date: /usr/include/complex_bessel.h
    -- Up-to-date: /usr/include/complex_bessel_bits
    -- Up-to-date: /usr/include/complex_bessel_bits/besselFunctions.h
    -- Up-to-date: /usr/include/complex_bessel_bits/fortranLinkage.h
    -- Up-to-date: /usr/include/complex_bessel_bits/sph_besselFunctions.h
    -- Up-to-date: /usr/include/complex_bessel_bits/utilities.h
    but the fortran functions remain undefined.
    sorry to be bothering you and thanks for all the help. I really need this complex bessel functions.
    $  g++ hankeltest.cpp -o besseltest.exe
    /tmp/ccsK4FbU.o:hankeltest.cpp:(.text$_ZN9sp_bessel8hankelH1EdSt7complexIdE[_ZN9sp_bessel8hankelH1EdSt7complexIdE]+0xea): undefined reference to `zbesh_wrap'
    /tmp/ccsK4FbU.o:hankeltest.cpp:(.text$_ZN9sp_bessel8hankelH1EdSt7complexIdE[_ZN9sp_bessel8hankelH1EdSt7complexIdE]+0xea): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `zbesh_wrap'
    collect2: error: ld returned 1 exit status
    Joey Dumont
    @joeydumont
    You have to link against the library.
    g++ hankeltest.cpp -o besseltest.exe -lcomplex_bessel.
    It might be -lcygcomplex_bessel-0.6.0 in Cygwin, I am not exactly sure.
    I'm not sure what your project is, but you could also evaluate Bessel functions with real orders and complex arguments with scipy.
    Chico Lustosa
    @chicolustosa_twitter
    Okay, I'll check it out.
    Now, I can create the file but was not able to load it
    do I need to link against the library to run the .exe also?
    Joey Dumont
    @joeydumont
    No, linking is part of the compilation process.
    Chico Lustosa
    @chicolustosa_twitter
    ./besseltest.exe
    C:/cygwin64/home/Chico/complex_bessel-release-0.6/tests/besseltest.exe: error while loading shared libraries: cygcomplex_bessel-0.6.0.dll: cannot open shared object file: No such file or directory