Csound Csound-dev Csound-tekno Search About

Re: Compile error on 10.12.2

Date2016-11-02 20:43
Fromjpff
SubjectRe: Compile error on 10.12.2
I think this is issue #631.  Check this page
https://github.com/csound/csound/issues/631

But I neither a mac nor python user
==John ffitch

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-11-03 09:37
Fromrmgls
SubjectRe: Compile error on 10.12.2
Hello, 

Yes, but the solution  does nothing, as I configured it.

I found this on stackoverflow
And,  so, I installed the csound6.07.dmg waiting I find what to do to compile from git.

Thanks  for your reply.

Raoul
     I just needed a way to convert a file object to a ctypes FILE* so
     that I can pass it to GD.

   You are out of luck. That was possible in Python 2.x, but is not
   possible in Python 3.x. The documentation explains why not:

     These APIs are a minimal emulation of the Python 2 C API for
     built-in file objects, which used to rely on the buffered I/O
     (FILE*) support from the C standard library. In Python 3, files and
     streams use the new io module, which defines several layers over the
     low-level unbuffered I/O of the operating system.

   If you want a FILE* you are going to have to make one yourself, using
   the C standard library directly.
     answered Apr 21 '13 at 14:39
   David Heffernan
 
     I just needed a way to convert a file object to a ctypes FILE* so
     that I can pass it to GD.

   You are out of luck. That was possible in Python 2.x, but is not
   possible in Python 3.x. The documentation explains why not:

     These APIs are a minimal emulation of the Python 2 C API for
     built-in file objects, which used to rely on the buffered I/O
     (FILE*) support from the C standard library. In Python 3, files and
     streams use the new io module, which defines several layers over the
     low-level unbuffered I/O of the operating system.

   If you want a FILE* you are going to have to make one yourself, using
   the C standard library directly.
   share|improve this answer
   answered Apr 21 '13 at 14:39
 
On 2 Nov 2016, at 21:43, jpff <jpff@CODEMIST.CO.UK> wrote:

I think this is issue #631.  Check this page
https://github.com/csound/csound/issues/631

But I neither a mac nor python user
==John ffitch

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Date2016-11-06 15:16
FromSteven Yi
SubjectRe: Compile error on 10.12.2
I think we haven't come to a conclusion on how to deal with Python 2/3
for both Csound 6 and 7.  For now though, the primary issue is that
CMake is finding a python3 framework, and Csound 6's python-related
code is designed for Python 2.x.  Your output shows it is using:

/opt/local/Library/Frameworks/Python.fra=
mework/Versions/3.4/include/python3.4m/pythonrun.h:203:23: note: expanded f=
rom macro 'PyRun_File' PyRun_FileExFlags(fp, p, s, g, l, 0, NULL) ^~ /opt/l=
ocal/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/py=
thonrun.h:128:11: note: passing argument to parameter 'fp' here FILE *fp, ^=
 4 warnings generated. [ 62%] Linking C shared library ../libpy.dylib Undef=
ined symbols for architecture x86_64: "_PyFile_AsFile", referenced from: _e=
xec_file_in_given_context in pythonopcodes.c.o "_PyFile_FromString", refere=
nced from: _exec_file_in_given_context in pythonopcodes.c.o ld: symbol(s) n=
ot found for architecture x86_64 clang: error: linker command failed with e=
xit code 1 (use -v to see invocation) make[2]: *** [libpy.dylib] Error 1 ma=
ke[1]: *** [Opcodes/CMakeFiles/py.dir/all] Error 2 make: *** [all] Error 2=
=20

in /opt/local.  There are two workarounds I can think of:

1. In your build directory, modify the CMakeCache.txt and change the
values that find python 3 and replace them with the system's Python,
which should be python 2.7 I believe.
2. If you don't need the python stuff (opcodes or csnd6 module), you
can disable building those.  This can be done on the commandline when
running cmake, using something like "cmake ..
-DBUILD_PYTHON_INTERFACES=OFF -DBUILD_PYTHON_OPCODES=OFF" or editing
those values within the CMakeCache.txt.



On Thu, Nov 3, 2016 at 5:37 AM, rmgls  wrote:
> Hello,
>
> Yes, but the solution  does nothing, as I configured it.
>
> I found this on stackoverflow
> And,  so, I installed the csound6.07.dmg waiting I find what to do to
> compile from git.
>
> Thanks  for your reply.
>
> Raoul
> rmgls@orange.fr
>      I just needed a way to convert a file object to a ctypes FILE* so
>      that I can pass it to GD.
>
>    You are out of luck. That was possible in Python 2.x, but is not
>    possible in Python 3.x. The documentation explains why not:
>
>      These APIs are a minimal emulation of the Python 2 C API for
>      built-in file objects, which used to rely on the buffered I/O
>      (FILE*) support from the C standard library. In Python 3, files and
>      streams use the new io module, which defines several layers over the
>      low-level unbuffered I/O of the operating system.
>
>    If you want a FILE* you are going to have to make one yourself, using
>    the C standard library directly.
>      answered Apr 21 '13 at 14:39
>    David Heffernan
>
>      I just needed a way to convert a file object to a ctypes FILE* so
>      that I can pass it to GD.
>
>    You are out of luck. That was possible in Python 2.x, but is not
>    possible in Python 3.x. The documentation explains why not:
>
>      These APIs are a minimal emulation of the Python 2 C API for
>      built-in file objects, which used to rely on the buffered I/O
>      (FILE*) support from the C standard library. In Python 3, files and
>      streams use the new io module, which defines several layers over the
>      low-level unbuffered I/O of the operating system.
>
>    If you want a FILE* you are going to have to make one yourself, using
>    the C standard library directly.
>    share|improve this answer
>    answered Apr 21 '13 at 14:39
>
>
> On 2 Nov 2016, at 21:43, jpff  wrote:
>
> I think this is issue #631.  Check this page
> https://github.com/csound/csound/issues/631
>
> But I neither a mac nor python user
> ==John ffitch
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
>
> Csound mailing list Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
> https://github.com/csound/csound/issues Discussions of bugs and features can
> be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2016-11-07 19:35
Fromrmgls
SubjectRe: Compile error on 10.12.2
Hi Steven,

Thanks for your reply.
Without python_interface and without python_opcode  Csound from git build fine.
Thanks for this  workaround.
But I will continue to track the issue and report if I find a solution.


Best Regards

Raoul MEGELAS

On 6 Nov 2016, at 16:16, Steven Yi <stevenyi@GMAIL.COM> wrote:

I think we haven't come to a conclusion on how to deal with Python 2/3
for both Csound 6 and 7.  For now though, the primary issue is that
CMake is finding a python3 framework, and Csound 6's python-related
code is designed for Python 2.x.  Your output shows it is using:

/opt/local/Library/Frameworks/Python.fra=
mework/Versions/3.4/include/python3.4m/pythonrun.h:203:23: note: expanded f=
rom macro 'PyRun_File' PyRun_FileExFlags(fp, p, s, g, l, 0, NULL) ^~ /opt/l=
ocal/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/py=
thonrun.h:128:11: note: passing argument to parameter 'fp' here FILE *fp, ^=
4 warnings generated. [ 62%] Linking C shared library ../libpy.dylib Undef=
ined symbols for architecture x86_64: "_PyFile_AsFile", referenced from: _e=
xec_file_in_given_context in pythonopcodes.c.o "_PyFile_FromString", refere=
nced from: _exec_file_in_given_context in pythonopcodes.c.o ld: symbol(s) n=
ot found for architecture x86_64 clang: error: linker command failed with e=
xit code 1 (use -v to see invocation) make[2]: *** [libpy.dylib] Error 1 ma=
ke[1]: *** [Opcodes/CMakeFiles/py.dir/all] Error 2 make: *** [all] Error 2=
=20

in /opt/local.  There are two workarounds I can think of:

1. In your build directory, modify the CMakeCache.txt and change the
values that find python 3 and replace them with the system's Python,
which should be python 2.7 I believe.
2. If you don't need the python stuff (opcodes or csnd6 module), you
can disable building those.  This can be done on the commandline when
running cmake, using something like "cmake ..
-DBUILD_PYTHON_INTERFACES=OFF -DBUILD_PYTHON_OPCODES=OFF" or editing
those values within the CMakeCache.txt.



On Thu, Nov 3, 2016 at 5:37 AM, rmgls <rmgls@orange.fr> wrote:
Hello,

Yes, but the solution  does nothing, as I configured it.

I found this on stackoverflow
And,  so, I installed the csound6.07.dmg waiting I find what to do to
compile from git.

Thanks  for your reply.

Raoul
rmgls@orange.fr
    I just needed a way to convert a file object to a ctypes FILE* so
    that I can pass it to GD.

  You are out of luck. That was possible in Python 2.x, but is not
  possible in Python 3.x. The documentation explains why not:

    These APIs are a minimal emulation of the Python 2 C API for
    built-in file objects, which used to rely on the buffered I/O
    (FILE*) support from the C standard library. In Python 3, files and
    streams use the new io module, which defines several layers over the
    low-level unbuffered I/O of the operating system.

  If you want a FILE* you are going to have to make one yourself, using
  the C standard library directly.
    answered Apr 21 '13 at 14:39
  David Heffernan

    I just needed a way to convert a file object to a ctypes FILE* so
    that I can pass it to GD.

  You are out of luck. That was possible in Python 2.x, but is not
  possible in Python 3.x. The documentation explains why not:

    These APIs are a minimal emulation of the Python 2 C API for
    built-in file objects, which used to rely on the buffered I/O
    (FILE*) support from the C standard library. In Python 3, files and
    streams use the new io module, which defines several layers over the
    low-level unbuffered I/O of the operating system.

  If you want a FILE* you are going to have to make one yourself, using
  the C standard library directly.
  share|improve this answer
  answered Apr 21 '13 at 14:39


On 2 Nov 2016, at 21:43, jpff <jpff@CODEMIST.CO.UK> wrote:

I think this is issue #631.  Check this page
https://github.com/csound/csound/issues/631

But I neither a mac nor python user
==John ffitch

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
      https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
https://github.com/csound/csound/issues Discussions of bugs and features can
be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Date2016-11-07 20:32
Fromrmgls
SubjectRe: Compile error on 10.12.2
Hello Steven,

That’s done.

For the record:

Sudo port -f deactivate python 34 @VERSION

(Here version is @3.4.5_1

Sudo port install swig-python

(This one was hidden by the python34 error.

And as usual:

cMake ..
Make &  sudo make install

After of Course because it is needed:

Sudo port install python34.


Best Regards

Raoul MEGELAS

On 6 Nov 2016, at 16:16, Steven Yi <stevenyi@GMAIL.COM> wrote:

I think we haven't come to a conclusion on how to deal with Python 2/3
for both Csound 6 and 7.  For now though, the primary issue is that
CMake is finding a python3 framework, and Csound 6's python-related
code is designed for Python 2.x.  Your output shows it is using:

/opt/local/Library/Frameworks/Python.fra=
mework/Versions/3.4/include/python3.4m/pythonrun.h:203:23: note: expanded f=
rom macro 'PyRun_File' PyRun_FileExFlags(fp, p, s, g, l, 0, NULL) ^~ /opt/l=
ocal/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/py=
thonrun.h:128:11: note: passing argument to parameter 'fp' here FILE *fp, ^=
4 warnings generated. [ 62%] Linking C shared library ../libpy.dylib Undef=
ined symbols for architecture x86_64: "_PyFile_AsFile", referenced from: _e=
xec_file_in_given_context in pythonopcodes.c.o "_PyFile_FromString", refere=
nced from: _exec_file_in_given_context in pythonopcodes.c.o ld: symbol(s) n=
ot found for architecture x86_64 clang: error: linker command failed with e=
xit code 1 (use -v to see invocation) make[2]: *** [libpy.dylib] Error 1 ma=
ke[1]: *** [Opcodes/CMakeFiles/py.dir/all] Error 2 make: *** [all] Error 2=
=20

in /opt/local.  There are two workarounds I can think of:

1. In your build directory, modify the CMakeCache.txt and change the
values that find python 3 and replace them with the system's Python,
which should be python 2.7 I believe.
2. If you don't need the python stuff (opcodes or csnd6 module), you
can disable building those.  This can be done on the commandline when
running cmake, using something like "cmake ..
-DBUILD_PYTHON_INTERFACES=OFF -DBUILD_PYTHON_OPCODES=OFF" or editing
those values within the CMakeCache.txt.



On Thu, Nov 3, 2016 at 5:37 AM, rmgls <rmgls@orange.fr> wrote:
Hello,

Yes, but the solution  does nothing, as I configured it.

I found this on stackoverflow
And,  so, I installed the csound6.07.dmg waiting I find what to do to
compile from git.

Thanks  for your reply.

Raoul
rmgls@orange.fr
    I just needed a way to convert a file object to a ctypes FILE* so
    that I can pass it to GD.

  You are out of luck. That was possible in Python 2.x, but is not
  possible in Python 3.x. The documentation explains why not:

    These APIs are a minimal emulation of the Python 2 C API for
    built-in file objects, which used to rely on the buffered I/O
    (FILE*) support from the C standard library. In Python 3, files and
    streams use the new io module, which defines several layers over the
    low-level unbuffered I/O of the operating system.

  If you want a FILE* you are going to have to make one yourself, using
  the C standard library directly.
    answered Apr 21 '13 at 14:39
  David Heffernan

    I just needed a way to convert a file object to a ctypes FILE* so
    that I can pass it to GD.

  You are out of luck. That was possible in Python 2.x, but is not
  possible in Python 3.x. The documentation explains why not:

    These APIs are a minimal emulation of the Python 2 C API for
    built-in file objects, which used to rely on the buffered I/O
    (FILE*) support from the C standard library. In Python 3, files and
    streams use the new io module, which defines several layers over the
    low-level unbuffered I/O of the operating system.

  If you want a FILE* you are going to have to make one yourself, using
  the C standard library directly.
  share|improve this answer
  answered Apr 21 '13 at 14:39


On 2 Nov 2016, at 21:43, jpff <jpff@CODEMIST.CO.UK> wrote:

I think this is issue #631.  Check this page
https://github.com/csound/csound/issues/631

But I neither a mac nor python user
==John ffitch

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
      https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Csound mailing list Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to
https://github.com/csound/csound/issues Discussions of bugs and features can
be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here