Csound Csound-dev Csound-tekno Search About

Segmentation Fault Using ctcsound

Date2016-05-01 15:00
FromMitch Kaufman
SubjectSegmentation Fault Using ctcsound
Hi Francois,

I am trying to learn how to use ctcsound.  When I run the "test_ctcsound.py" it produces a segmentation fault that simply reads:

Csound tidy up: Segmentation fault
Segmentation fault (core dumped)

I installed python through anaconda so I saw numpy was installed through this.  I am running Arch Linux with a very recently built 6.07 csound.  I am also able to run python code through the Python Csound API but not ctcsound.  Do you have any ideas on why this would happen?

Regards,
Mitch

Date2016-05-01 17:34
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
Hello Mitch,

did you run the last version of "test_ctcsound.py" from github ?

Francois

2016-05-01 16:00 GMT+02:00 Mitch Kaufman <mitch.kaufman@hotmail.com>:
Hi Francois,

I am trying to learn how to use ctcsound.  When I run the "test_ctcsound.py" it produces a segmentation fault that simply reads:

Csound tidy up: Segmentation fault
Segmentation fault (core dumped)

I installed python through anaconda so I saw numpy was installed through this.  I am running Arch Linux with a very recently built 6.07 csound.  I am also able to run python code through the Python Csound API but not ctcsound.  Do you have any ideas on why this would happen?

Regards,
Mitch
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-05-01 23:08
FromMitch Kaufman
SubjectRe: Segmentation Fault Using ctcsound
Yes I did. 

On May 1, 2016, at 12:34 PM, Francois PINOT <fggpinot@GMAIL.COM> wrote:

Hello Mitch,

did you run the last version of "test_ctcsound.py" from github ?

Francois

2016-05-01 16:00 GMT+02:00 Mitch Kaufman <mitch.kaufman@hotmail.com>:
Hi Francois,

I am trying to learn how to use ctcsound.  When I run the "test_ctcsound.py" it produces a segmentation fault that simply reads:

Csound tidy up: Segmentation fault
Segmentation fault (core dumped)

I installed python through anaconda so I saw numpy was installed through this.  I am running Arch Linux with a very recently built 6.07 csound.  I am also able to run python code through the Python Csound API but not ctcsound.  Do you have any ideas on why this would happen?

Regards,
Mitch
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-05-02 07:48
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
Is your OS a 64 bit or a 32 bit version ? Did you build Csound with double or with float?
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-05-02 10:36
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
Francois,

It's 64 bit with double samples.

Regards,
Mitch


Date: Sun, 1 May 2016 23:48:59 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Is your OS a 64 bit or a 32 bit version ? Did you build Csound with double or with float?
Csound mailing list [hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749396.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-02 11:04
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
Ok, if you installed Python with anaconda and if you pulled ctcsound from github, you can go into the cookbook dir of ctcsound and start a jupyter notebook from the console with this command:
 
jupyter notebook

It will open a jupyter page in your browser. You can then open the recipes by clicking on their link. For each recipe clear all the cells (menu Cell->All Output-> Clear).

Then run successively each cell by clicking into the cell to select it and then by typing shift-return. You will get Python output below the cell and Csound output in the console.

If it crashes Csound can you report where it happened (which recipe and which cell).

Francois

2016-05-02 11:36 GMT+02:00 mitchk <mitch.kaufman@hotmail.com>:
Francois,

It's 64 bit with double samples.

Regards,
Mitch


Date: Sun, 1 May 2016 23:48:59 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Is your OS a 64 bit or a 32 bit version ? Did you build Csound with double or with float?
Csound mailing list [hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749396.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.

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-05-02 11:49
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
It was at the 01-the-ctcsound-module and it crashed at:

cs = ctcsound.Csound()

Regards,
Mitch


Date: Mon, 2 May 2016 03:05:08 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Ok, if you installed Python with anaconda and if you pulled ctcsound from github, you can go into the cookbook dir of ctcsound and start a jupyter notebook from the console with this command:
 
jupyter notebook

It will open a jupyter page in your browser. You can then open the recipes by clicking on their link. For each recipe clear all the cells (menu Cell->All Output-> Clear).

Then run successively each cell by clicking into the cell to select it and then by typing shift-return. You will get Python output below the cell and Csound output in the console.

If it crashes Csound can you report where it happened (which recipe and which cell).

Francois



View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-02 13:24
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
What happens when you open an Ipython console and type the following commands?

import ctypes
libcsound = ctypes.CDLL("libcsound64.so")
cs = libcsound.csoundCreate(None)

Francois

2016-05-02 12:49 GMT+02:00 mitchk <mitch.kaufman@hotmail.com>:
It was at the 01-the-ctcsound-module and it crashed at:

cs = ctcsound.Csound()

Regards,
Mitch


Date: Mon, 2 May 2016 03:05:08 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Ok, if you installed Python with anaconda and if you pulled ctcsound from github, you can go into the cookbook dir of ctcsound and start a jupyter notebook from the console with this command:
 
jupyter notebook

It will open a jupyter page in your browser. You can then open the recipes by clicking on their link. For each recipe clear all the cells (menu Cell->All Output-> Clear).

Then run successively each cell by clicking into the cell to select it and then by typing shift-return. You will get Python output below the cell and Csound output in the console.

If it crashes Csound can you report where it happened (which recipe and which cell).

Francois



View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-02 22:56
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
Francois,

The segmentation fault occurs on the last line: 

cs = libcsound.csoundCreate(None)

Regards,
Mitch


Date: Mon, 2 May 2016 05:25:21 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

What happens when you open an Ipython console and type the following commands?

import ctypes
libcsound = ctypes.CDLL("libcsound64.so")
cs = libcsound.csoundCreate(None)

Francois



View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-02 23:50
FromMichael Gogins
SubjectRe: Segmentation Fault Using ctcsound

Either Csound has been compiled for a different CPU architecture than your Python, or Csound is crashing because it is not finding some shared library it needs. Can you run Csound in the same environment you are running Python?

What happens if you do

print libcsound
print libcsound.csoundCreate

before calling libcsound.csoundCreate?

Regards,
Mike

On May 2, 2016 5:56 PM, "mitchk" <mitch.kaufman@hotmail.com> wrote:
Francois,

The segmentation fault occurs on the last line: 

cs = libcsound.csoundCreate(None)

Regards,
Mitch


Date: Mon, 2 May 2016 05:25:21 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

What happens when you open an Ipython console and type the following commands?

import ctypes
libcsound = ctypes.CDLL("libcsound64.so")
cs = libcsound.csoundCreate(None)

Francois



View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 00:09
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
Michael,

The output is below:

import ctypes
libcsound = ctypes.CDLL("libcsound64.so")
print (libcsound)
<CDLL 'libcsound64.so', handle 26e4c90 at 0x7fa26c595cc0>

print (libcsound.csoundCreate)
<_FuncPtr object at 0x7fa26c5918e0>

cs = libcsound.csoundCreate(None)

And then the segmentation fault occurs after running the "cs = libcsound.csoundCreate(None)

Regards,
Mitch

Date: Mon, 2 May 2016 15:51:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Either Csound has been compiled for a different CPU architecture than your Python, or Csound is crashing because it is not finding some shared library it needs. Can you run Csound in the same environment you are running Python?

What happens if you do

print libcsound
print libcsound.csoundCreate

before calling libcsound.csoundCreate?

Regards,
Mike

On May 2, 2016 5:56 PM, "mitchk" <[hidden email]> wrote:
Francois,

The segmentation fault occurs on the last line: 

cs = libcsound.csoundCreate(None)

Regards,
Mitch


Date: Mon, 2 May 2016 05:25:21 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

What happens when you open an Ipython console and type the following commands?

import ctypes
libcsound = ctypes.CDLL("libcsound64.so")
cs = libcsound.csoundCreate(None)

Francois



View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749430.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 03:31
FromMichael Gogins
SubjectRe: Segmentation Fault Using ctcsound
Attachmentsmkg_ctcsound.py  
Those printouts are good, so I don't understand what is happening.

I am on WIndows not Arch Linux, but I installed Anaconda for 64 bit
CPU architecture, and the attached script, which adds a performance of
Xanadu to your script, works fine for me. My printout is below.

Can you run gdb like this and get a stack trace?

restore@sorabji MINGW64 ~
$ gdb --args c:/anaconda2/python -i
c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py

Once gdb loads, you can run Csound by typing run at the gdb prompt. If
there is a crash, you should be able to view the stack trace by typing
bt at the gdb prompt. Here, once the script completed and I quit back
to gdb, I have just set a breakpoint at csoundCreate:

(gdb) break csoundCreate
Breakpoint 1 at 0x6c5f89f0: file
D:/msys64/home/restore/csound/Top/csound.c, line 1156.
(gdb) run
Starting program: c:\anaconda2\python.exe -i
c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py
[New Thread 5768.0x330]
libcsound:  
libcsound.csoundCreate: <_FuncPtr object at 0x0000000001F70458>

Breakpoint 1, csoundCreate (hostdata=0x0)
    at D:/msys64/home/restore/csound/Top/csound.c:1156
1156    {
(gdb) bt
#0  csoundCreate (hostdata=0x0)
    at D:/msys64/home/restore/csound/Top/csound.c:1156
#1  0x00000000729a18f3 in _ctypes!DllCanUnloadNow ()
   from c:\anaconda2\DLLs\_ctypes.pyd
#2  0x000000007299ffd2 in _ctypes!DllCanUnloadNow ()
   from c:\anaconda2\DLLs\_ctypes.pyd
#3  0x000000007299b4cd in _ctypes!DllCanUnloadNow ()
   from c:\anaconda2\DLLs\_ctypes.pyd
#4  0x000000007299bded in _ctypes!DllCanUnloadNow ()
   from c:\anaconda2\DLLs\_ctypes.pyd
#5  0x0000000072996a82 in ?? () from c:\anaconda2\DLLs\_ctypes.pyd
#6  0x000000001e08e155 in python27!PyObject_Call ()
   from c:\anaconda2\python27.dll
#7  0x000000001e11451b in python27!PyEval_GetGlobals ()
   from c:\anaconda2\python27.dll
#8  0x000000001e114dca in python27!PyEval_GetGlobals ()
   from c:\anaconda2\python27.dll
#9  0x000000001e118534 in python27!PyEval_EvalFrameEx ()
   from c:\anaconda2\python27.dll
#10 0x000000001e119dd2 in python27!PyEval_EvalCodeEx ()
   from c:\anaconda2\python27.dll
#11 0x000000001e119e69 in python27!PyEval_EvalCode ()
   from c:\anaconda2\python27.dll
#12 0x000000001e146b6a in python27!PyErr_Display ()
   from c:\anaconda2\python27.dll
#13 0x000000001e147e5a in python27!PyRun_FileExFlags ()
   from c:\anaconda2\python27.dll
#14 0x000000001e1484b0 in python27!PyRun_SimpleFileExFlags ()
   from c:\anaconda2\python27.dll
#15 0x000000001e148e43 in python27!PyRun_AnyFileExFlags ()
   from c:\anaconda2\python27.dll
#16 0x000000001e045300 in python27!Py_Main () from c:\anaconda2\python27.dll
#17 0x000000001d00119e in ?? ()
#18 0x000007fbdb451842 in KERNEL32!BaseThreadInitThunk ()
   from C:\Windows\system32\kernel32.dll
#19 0x000007fbde0bdf11 in ntdll!RtlUserThreadStart ()
   from C:\Windows\SYSTEM32\ntdll.dll
#20 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) list
1151        csoundUnLock();
1152        return 0;
1153      }
1154
1155    PUBLIC CSOUND *csoundCreate(void *hostdata)
1156    {
1157        CSOUND        *csound;
1158        csInstance_t  *p;
1159        _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
1160
(gdb)

If you try this we may well find out what the problem is.

Regards,
Mike

>C:/anaconda2/pythonw -u "mkg_ctcsound.py"
libcsound:  
libcsound.csoundCreate: <_FuncPtr object at 0x0000000001F22458>
cs: 34275456 
virtual_keyboard real time MIDI plugin for Csound
0dBFS level = 32768.0
Csound version 6.07 (double samples) Apr 30 2016
libsndfile-1.0.26-exp
STARTING FILE
Creating options
Creating orchestra
Creating score
rtaudio: PortAudio module enabled ...
using callback interface
rtmidi: PortMIDI module enabled
--Csound version 6.07 (double samples) Apr 30 2016
displays suppressed
0dBFS level = 32768.0
orch now loaded
audio buffered in 4096 sample-frame blocks
PortAudio V19.5.0-devel, revision unknown
   0: dac0 (Microsoft Sound Mapper - Output)
   1: dac1 (Line Out (Scarlett 2i4 USB))
   2: dac2 (Speakers (VIA High Definition A)
   3: dac3 (SPDIF Interface (TX0) (VIA High)
   4: dac4 (Primary Sound Driver)
   5: dac5 (Line Out (Scarlett 2i4 USB))
   6: dac6 (Speakers (VIA High Definition Audio))
   7: dac7 (SPDIF Interface (TX0) (VIA High Definition Audio))
   8: dac8 (Focusrite USB 2.0 Audio Driver)
   9: dac9 (SPDIF Out (HD Audio digital out))
  10: dac10 (Speakers (VIA HD Audio Output))
  11: dac11 (Output (Scarlett 2i4 USB))
PortAudio: selected output device 'Line Out (Scarlett 2i4 USB)'
writing 8192 sample blks of 64-bit floats to dac
SECTION 1:
ftable 1:
ftable 2:
ftable 3:
new alloc for instr 1:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
B  0.000 ..  0.100 T  0.100 TT  0.100 M:   1999.9   1999.5
new alloc for instr 1:
B  0.100 ..  0.200 T  0.200 TT  0.200 M:   5755.8   3794.0
new alloc for instr 1:
B  0.200 ..  0.300 T  0.299 TT  0.299 M:   8782.7   5230.9
new alloc for instr 1:
B  0.300 ..  0.400 T  0.399 TT  0.399 M:  10412.1   6699.2
new alloc for instr 1:
B  0.400 ..  0.500 T  0.501 TT  0.501 M:   9477.1   8042.6
new alloc for instr 1:
B  0.500 ..  7.500 T  7.501 TT  7.501 M:  16990.1  12487.3
new alloc for instr 2:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
new alloc for instr 3:
B  7.500 ..  7.600 T  7.601 TT  7.601 M:   5612.4   6009.7
new alloc for instr 2:
B  7.600 ..  7.700 T  7.701 TT  7.701 M:   6798.0   6112.6
new alloc for instr 2:
B  7.700 ..  7.800 T  7.800 TT  7.800 M:   7654.7   7002.3
new alloc for instr 2:
B  7.800 ..  7.900 T  7.900 TT  7.900 M:   6624.5   8351.3
new alloc for instr 2:
B  7.900 ..  8.000 T  8.000 TT  8.000 M:   9217.4   7348.6
new alloc for instr 2:
B  8.000 .. 15.000 T 15.000 TT 15.000 M:  10262.5   9329.4
new alloc for instr 2:
B 15.000 .. 15.100 T 15.100 TT 15.100 M:   5115.5   5809.8
new alloc for instr 2:
B 15.100 .. 15.200 T 15.200 TT 15.200 M:   5478.3   4917.6
new alloc for instr 2:
B 15.200 .. 15.300 T 15.299 TT 15.299 M:   5639.1   6953.1
new alloc for instr 2:
B 15.300 .. 15.400 T 15.399 TT 15.399 M:   7688.3   7673.3
new alloc for instr 2:
B 15.400 .. 15.500 T 15.501 TT 15.501 M:   9106.7   9066.1
new alloc for instr 2:
B 15.500 .. 22.500 T 22.501 TT 22.501 M:   9200.0  10239.6
B 22.500 .. 22.600 T 22.601 TT 22.601 M:   6087.7   7001.9
B 22.600 .. 22.700 T 22.701 TT 22.701 M:   8114.5   7398.5
B 22.700 .. 22.800 T 22.800 TT 22.800 M:   7938.6   7928.9
B 22.800 .. 22.900 T 22.900 TT 22.900 M:   7536.8   6641.0
B 22.900 .. 23.000 T 23.000 TT 23.000 M:   8915.5   9171.9
B 23.000 .. 30.000 T 30.000 TT 30.000 M:   9450.1   9550.3
B 30.000 .. 30.100 T 30.100 TT 30.100 M:   5442.7   6242.4
B 30.100 .. 30.200 T 30.200 TT 30.200 M:   6293.5   5798.4
B 30.200 .. 30.300 T 30.299 TT 30.299 M:   5729.9   7936.7
B 30.300 .. 30.400 T 30.399 TT 30.399 M:   5920.5   6975.7
B 30.400 .. 30.500 T 30.501 TT 30.501 M:   8070.1   7141.6
B 30.500 .. 37.500 T 37.501 TT 37.501 M:   7694.1   8497.9
B 37.500 .. 37.600 T 37.601 TT 37.601 M:   6667.2   7613.3
B 37.600 .. 37.700 T 37.701 TT 37.701 M:   8420.4   7607.9
B 37.700 .. 37.800 T 37.800 TT 37.800 M:   7448.0   7603.9
B 37.800 .. 37.900 T 37.900 TT 37.900 M:   6585.6   8570.8
B 37.900 .. 38.000 T 38.000 TT 38.000 M:   9267.5   9218.0
B 38.000 .. 45.000 T 45.000 TT 45.000 M:   8765.8   8436.8
B 45.000 .. 45.100 T 45.100 TT 45.100 M:   6389.8   7569.9
B 45.100 .. 45.200 T 45.200 TT 45.200 M:   8573.4   8367.7
B 45.200 .. 45.300 T 45.299 TT 45.299 M:  14068.6   8325.8
B 45.300 .. 45.400 T 45.399 TT 45.399 M:  11106.0   9674.0
B 45.400 .. 45.500 T 45.501 TT 45.501 M:  11654.5   9912.0
B 45.500 .. 47.500 T 47.501 TT 47.501 M:  13477.4  14026.2
B 47.500 .. 47.600 T 47.601 TT 47.601 M:   8668.9   8126.7
B 47.600 .. 47.700 T 47.701 TT 47.701 M:   8692.6   8357.3
B 47.700 .. 47.800 T 47.800 TT 47.800 M:   8850.5   6702.9
B 47.800 .. 47.900 T 47.900 TT 47.900 M:   8750.2   6241.5
B 47.900 .. 48.000 T 48.000 TT 48.000 M:   6955.4   6251.4
B 48.000 .. 52.500 T 52.501 TT 52.501 M:   7907.8   7549.5
B 52.500 .. 55.000 T 55.000 TT 55.000 M:   7642.7   7407.2
B 55.000 .. 55.100 T 55.100 TT 55.100 M:   6226.8   5087.2
B 55.100 .. 55.200 T 55.200 TT 55.200 M:   5874.3   5644.3
B 55.200 .. 55.300 T 55.299 TT 55.299 M:   6512.8   7280.6
B 55.300 .. 55.400 T 55.399 TT 55.399 M:   6351.1   6406.9
B 55.400 .. 55.500 T 55.501 TT 55.501 M:   5877.1   5551.8
B 55.500 .. 60.000 T 60.000 TT 60.000 M:   6259.3   5997.3
Score finished in csoundPerform().
>Exit code: 0

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Mon, May 2, 2016 at 7:09 PM, mitchk  wrote:
> Michael,
>
> The output is below:
>
> import ctypes
> libcsound = ctypes.CDLL("libcsound64.so")
> print (libcsound)
>
> 
>
> print (libcsound.csoundCreate)
>
> <_FuncPtr object at 0x7fa26c5918e0>
>
> cs = libcsound.csoundCreate(None)
>
> And then the segmentation fault occurs after running the "cs =
> libcsound.csoundCreate(None)
>
> Regards,
> Mitch
> ________________________________
> Date: Mon, 2 May 2016 15:51:30 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Csnd] Segmentation Fault Using ctcsound
>
> Either Csound has been compiled for a different CPU architecture than your
> Python, or Csound is crashing because it is not finding some shared library
> it needs. Can you run Csound in the same environment you are running Python?
>
> What happens if you do
>
> print libcsound
> print libcsound.csoundCreate
>
> before calling libcsound.csoundCreate?
>
> Regards,
> Mike
>
> On May 2, 2016 5:56 PM, "mitchk" <[hidden email]> wrote:
>
> Francois,
>
> The segmentation fault occurs on the last line:
>
> cs = libcsound.csoundCreate(None)
>
> Regards,
> Mitch
>
> ________________________________
> Date: Mon, 2 May 2016 05:25:21 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [Csnd] Segmentation Fault Using ctcsound
>
> What happens when you open an Ipython console and type the following
> commands?
>
> import ctypes
> libcsound = ctypes.CDLL("libcsound64.so")
> cs = libcsound.csoundCreate(None)
>
> Francois
>
>
> ________________________________
> View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
> Sent from the Csound - General mailing list archive at Nabble.com.
> Csound mailing list [hidden email]
> 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 [hidden email]
> 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
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749430.html
> To start a new topic under Csound - General, email [hidden email]
> To unsubscribe from Csound, click here.
> NAML
>
> ________________________________
> View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
> Sent from the Csound - General mailing list archive at Nabble.com.
> 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-05-03 05:31
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 07:20
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
Attachmentsmkg_ctcsound.py  
Could you type the command 'python --version' and show us the output?

As an attachment Mike's script modified to work on my linux box with Python2 and Python3 as well.

Francois

2016-05-03 6:31 GMT+02:00 mitchk <mitch.kaufman@hotmail.com>:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 10:50
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound


[mitch@mitcharch ~]$ python --version
Python 3.5.1 :: Anaconda 4.0.0 (64-bit)



Date: Mon, 2 May 2016 23:21:28 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Could you type the command 'python --version' and show us the output?

As an attachment Mike's script modified to work on my linux box with Python2 and Python3 as well.

Francois

2016-05-03 6:31 GMT+02:00 mitchk <[hidden email]>:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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

mkg_ctcsound.py (11K) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749435.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 11:15
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
So if your default version is Python 3.5.1 from anaconda, a script using csnd6 would normally not work because it needs Python 2.7. I think you have a conflict between native arch linux Python package and your anaconda installation.

Here's what I did on my Ubuntu 14.04 64 bit box:

1) run Anaconda3-4.0.0-Linux-x86_64.sh (downloaded from https://www.continuum.io/downloads). I installed the anaconda3 directory in my home/pinot directory

2) Create a Python2 environment with the following commands (the 3rd command adds a Python2 kernel in Jupyter):
conda create -n ipykernel_py2 python=2 ipykernel anaconda
source activate ipykernel_py2
python -m ipykernel install --user

3) When I build csound, I first activate the Python2 environment with the command:
source activate ipykernel_py2
Then I build Csound.

Francois


2016-05-03 11:50 GMT+02:00 mitchk <mitch.kaufman@hotmail.com>:


[mitch@mitcharch ~]$ python --version
Python 3.5.1 :: Anaconda 4.0.0 (64-bit)



Date: Mon, 2 May 2016 23:21:28 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Could you type the command 'python --version' and show us the output?

As an attachment Mike's script modified to work on my linux box with Python2 and Python3 as well.

Francois

2016-05-03 6:31 GMT+02:00 mitchk <[hidden email]>:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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

mkg_ctcsound.py (11K) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749435.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 11:52
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
Thanks Francois (and Michael).  I'll give this a shot later today.

Regards,
Mitch


Date: Tue, 3 May 2016 03:15:58 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

So if your default version is Python 3.5.1 from anaconda, a script using csnd6 would normally not work because it needs Python 2.7. I think you have a conflict between native arch linux Python package and your anaconda installation.

Here's what I did on my Ubuntu 14.04 64 bit box:

1) run Anaconda3-4.0.0-Linux-x86_64.sh (downloaded from https://www.continuum.io/downloads). I installed the anaconda3 directory in my home/pinot directory

2) Create a Python2 environment with the following commands (the 3rd command adds a Python2 kernel in Jupyter):
conda create -n ipykernel_py2 python=2 ipykernel anaconda
source activate ipykernel_py2
python -m ipykernel install --user

3) When I build csound, I first activate the Python2 environment with the command:
source activate ipykernel_py2
Then I build Csound.

Francois


2016-05-03 11:50 GMT+02:00 mitchk <[hidden email]>:


[mitch@mitcharch ~]$ python --version
Python 3.5.1 :: Anaconda 4.0.0 (64-bit)



Date: Mon, 2 May 2016 23:21:28 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

Could you type the command 'python --version' and show us the output?

As an attachment Mike's script modified to work on my linux box with Python2 and Python3 as well.

Francois

2016-05-03 6:31 GMT+02:00 mitchk <[hidden email]>:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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

mkg_ctcsound.py (11K) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749435.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749440.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 12:49
FromMichael Gogins
SubjectRe: Segmentation Fault Using ctcsound

That's great. Csound is crashing when it tries to load some external library. The question is why this does not happen if you run Csound on the command line in the same environment. Have you tried that?

Also in gdb go to stack frame 10 and examine the parameters to csoundLoadLibrary and see which library is causing the problem. Move it away and try again.

Regards,
Mike

On May 3, 2016 12:31 AM, "mitchk" <mitch.kaufman@hotmail.com> wrote:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 14:57
FromMitch Kaufman
SubjectRe: Segmentation Fault Using ctcsound
Michael,

I have run Csound countless times through the command line and CsoundQt without any problems currently.  As mentioned previously I have also run the traditional Python API (i.e., non ctcsound Python) successfully as well with this build. 

You wrote:

Also in gdb go to stack frame 10 and examine the parameters to csoundLoadLibrary and see which library is causing the problem. Move it away and try again.

Can you explain how to do this?  I'm not very versed in gdb. 

Regards,
Mitch


On May 3, 2016, at 7:49 AM, Michael Gogins <michael.gogins@GMAIL.COM> wrote:

That's great. Csound is crashing when it tries to load some external library. The question is why this does not happen if you run Csound on the command line in the same environment. Have you tried that?

Also in gdb go to stack frame 10 and examine the parameters to csoundLoadLibrary and see which library is causing the problem. Move it away and try again.

Regards,
Mike

On May 3, 2016 12:31 AM, "mitchk" <mitch.kaufman@hotmail.com> wrote:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-03 15:33
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
When Python3 is active, trying to import csnd6 should raise an error:

~$ python
Python 3.5.0 |Anaconda 2.5.0 (64-bit)| (default, Oct 19 2015, 21:57:25)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import csnd6
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'csnd6'
>>>


On the contrary, when Python2 is active, there's no error.

~$ source activate ipykernel_py2
discarding /home/pinot/anaconda3/bin from PATH
prepending /home/pinot/anaconda3/envs/ipykernel_py2/bin to PATH
(ipykernel_py2)~$ python
Python 2.7.11 |Anaconda 4.0.0 (64-bit)| (default, Dec  6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import csnd6
>>>

This is normal behavior if Csound was built from a console where Python2 was active. Importing ctcsound can be done from both Python2 and Python3. I think you should have a Python2 in your Anaconda environments (see my previous mail), and you should rebuild Csound from a console where Python2  is active.

Francois

2016-05-03 15:57 GMT+02:00 Mitch Kaufman <mitch.kaufman@hotmail.com>:
Michael,

I have run Csound countless times through the command line and CsoundQt without any problems currently.  As mentioned previously I have also run the traditional Python API (i.e., non ctcsound Python) successfully as well with this build. 

You wrote:

Also in gdb go to stack frame 10 and examine the parameters to csoundLoadLibrary and see which library is causing the problem. Move it away and try again.

Can you explain how to do this?  I'm not very versed in gdb. 

Regards,
Mitch


On May 3, 2016, at 7:49 AM, Michael Gogins <michael.gogins@GMAIL.COM> wrote:

That's great. Csound is crashing when it tries to load some external library. The question is why this does not happen if you run Csound on the command line in the same environment. Have you tried that?

Also in gdb go to stack frame 10 and examine the parameters to csoundLoadLibrary and see which library is causing the problem. Move it away and try again.

Regards,
Mike

On May 3, 2016 12:31 AM, "mitchk" <mitch.kaufman@hotmail.com> wrote:
Michael,

I don't know if this is precisely what you want but here it is anyway...

Regards,
Mitch

+++

[mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i ~/Csound/ctcsound/mkg_ctcsound.py
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/anaconda/bin/python...done.
(gdb) break csoundCreate
Function "csoundCreate" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (csoundCreate) pending.
(gdb) run
Starting program: /opt/anaconda/bin/python -i /home/mitch/Csound/ctcsound/mkg_ctcsound.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>

Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
   from /home/mitch/lib/libcsound64.so
(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000001730 in ?? ()
(gdb) bt
#0  0x0000000000001730 in ?? ()
#1  0x00007ffff7de83ba in call_init.part () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7deca50 in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
#7  0x00007ffff7de8264 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
#9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
#10 0x00007ffff6009b47 in csoundOpenLibrary ()
   from /home/mitch/lib/libcsound64.so
#11 0x00007ffff60087e2 in csoundLoadExternal ()
   from /home/mitch/lib/libcsound64.so
#12 0x00007ffff60092ed in csoundLoadModules ()
   from /home/mitch/lib/libcsound64.so
#13 0x00007ffff600f336 in csoundReset () from /home/mitch/lib/libcsound64.so
#14 0x00007ffff600a4ec in csoundCreate () from /home/mitch/lib/libcsound64.so
#15 0x00007ffff65ce380 in ffi_call_unix64 ()
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
#16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
    fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
    avalue=0x7fffffffdff0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
#17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
    resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized out>,
    avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>, flags=4353)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
#18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
    argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
    restype=0x737f08, checker=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
#19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
    inargs=<optimized out>, kwds=0x0)
    at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
    arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
#21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
    pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
#22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
    at Python/ceval.c:4683
#23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
    at Python/ceval.c:3185
#24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
---Type <return> to continue, or q <return> to quit---
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
    closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
#25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
    argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
    defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
#26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
    globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
#27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
    locals=0x7ffff6985488, globals=0x7ffff6985488, filename=0x7ffff67e4090,
    mod=0x72f778) at Python/pythonrun.c:970
#28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
    start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
    closeit=<optimized out>, flags=0x7fffffffe6b0) at Python/pythonrun.c:923
#29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
    filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
    at Python/pythonrun.c:396
#30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
    filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
    fp=0x6e67e0) at Modules/main.c:318
#31 Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:769
#32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
    at ./Programs/python.c:69
(gdb) list
6    ./Programs/python.c: No such file or directory.
(gdb)




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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

Date2016-05-03 15:36
FromMichael Gogins
SubjectRe: Segmentation Fault Using ctcsound
Run in gdb till it crashes (on my computer, "gdb --args
c:/anaconda2/python -i
c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py").

In gdb, set  a breakpoint on csoundOpenLibrary: type "break csoundOpenLibrary"

Type "run" to restart the program. Python will run Csound and stop at
the breakpoint, and the filepath to the library will be printed as the
parameter to csoundOpenLibrary:

    libraryPath=libraryPath@entry=0x22f100
"D:/msys64/home/restore/csound/mingw64/csound-mingw64\\ampmidid.dll")

Type "cont" repeatedly until Csound crashes. The last filepath is the
offending library, so move it out of the directory and try again. Let
me know the name of the offending library. Or there may be some other
problem, in that case email me the text of your gdb session.

The whole session would be something like this:

(gdb) break csoundOpenLibrary
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) [answered Y; input not from terminal]
Starting program: c:\anaconda2\python.exe -i
c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py
[New Thread 3784.0xd64]
libcsound:  
libcsound.csoundCreate: <_FuncPtr object at 0x0000000001E50458>

Breakpoint 4, csoundLoadExternal (csound=0x7f1f10, csound@entry=0x1fe0080,
    libraryPath=libraryPath@entry=0x22f100
"D:/msys64/home/restore/csound/mingw64/csound-mingw64\\ampmidid.dll")
    at D:/msys64/home/restore/csound/Top/csmodule.c:247
247         err = csoundOpenLibrary(&h, libraryPath);
(gdb) cont
Continuing.

Breakpoint 4, csoundLoadExternal (csound=0x7f1f10, csound@entry=0x1fe0080,
    libraryPath=libraryPath@entry=0x22f100
"D:/msys64/home/restore/csound/mingw64/csound-mingw64\\buchla.dll")
    at D:/msys64/home/restore/csound/Top/csmodule.c:247
247         err = csoundOpenLibrary(&h, libraryPath);
(gdb)

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 3, 2016 at 9:57 AM, Mitch Kaufman  wrote:
> Michael,
>
> I have run Csound countless times through the command line and CsoundQt
> without any problems currently.  As mentioned previously I have also run the
> traditional Python API (i.e., non ctcsound Python) successfully as well with
> this build.
>
> You wrote:
>
> Also in gdb go to stack frame 10 and examine the parameters to
> csoundLoadLibrary and see which library is causing the problem. Move it away
> and try again.
>
> Can you explain how to do this?  I'm not very versed in gdb.
>
> Regards,
> Mitch
>
>
> On May 3, 2016, at 7:49 AM, Michael Gogins  wrote:
>
> That's great. Csound is crashing when it tries to load some external
> library. The question is why this does not happen if you run Csound on the
> command line in the same environment. Have you tried that?
>
> Also in gdb go to stack frame 10 and examine the parameters to
> csoundLoadLibrary and see which library is causing the problem. Move it away
> and try again.
>
> Regards,
> Mike
>
> On May 3, 2016 12:31 AM, "mitchk"  wrote:
>>
>> Michael,
>>
>> I don't know if this is precisely what you want but here it is anyway...
>>
>> Regards,
>> Mitch
>>
>> +++
>>
>> [mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i
>> ~/Csound/ctcsound/mkg_ctcsound.py
>> GNU gdb (GDB) 7.11
>> Copyright (C) 2016 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> 
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-pc-linux-gnu".
>> Type "show configuration" for configuration details.
>> For bug reporting instructions, please see:
>> .
>> Find the GDB manual and other documentation resources online at:
>> .
>> For help, type "help".
>> Type "apropos word" to search for commands related to "word"...
>> Reading symbols from /opt/anaconda/bin/python...done.
>> (gdb) break csoundCreate
>> Function "csoundCreate" not defined.
>> Make breakpoint pending on future shared library load? (y or [n]) y
>> Breakpoint 1 (csoundCreate) pending.
>> (gdb) run
>> Starting program: /opt/anaconda/bin/python -i
>> /home/mitch/Csound/ctcsound/mkg_ctcsound.py
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/usr/lib/libthread_db.so.1".
>> libcsound:  
>> libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>
>>
>> Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
>>    from /home/mitch/lib/libcsound64.so
>> (gdb) continue
>> Continuing.
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0000000000001730 in ?? ()
>> (gdb) bt
>> #0  0x0000000000001730 in ?? ()
>> #1  0x00007ffff7de83ba in call_init.part () from
>> /lib64/ld-linux-x86-64.so.2
>> #2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
>> #3  0x00007ffff7deca50 in dl_open_worker () from
>> /lib64/ld-linux-x86-64.so.2
>> #4  0x00007ffff7de8264 in _dl_catch_error () from
>> /lib64/ld-linux-x86-64.so.2
>> #5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
>> #6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
>> #7  0x00007ffff7de8264 in _dl_catch_error () from
>> /lib64/ld-linux-x86-64.so.2
>> #8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
>> #9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
>> #10 0x00007ffff6009b47 in csoundOpenLibrary ()
>>    from /home/mitch/lib/libcsound64.so
>> #11 0x00007ffff60087e2 in csoundLoadExternal ()
>>    from /home/mitch/lib/libcsound64.so
>> #12 0x00007ffff60092ed in csoundLoadModules ()
>>    from /home/mitch/lib/libcsound64.so
>> #13 0x00007ffff600f336 in csoundReset () from
>> /home/mitch/lib/libcsound64.so
>> #14 0x00007ffff600a4ec in csoundCreate () from
>> /home/mitch/lib/libcsound64.so
>> #15 0x00007ffff65ce380 in ffi_call_unix64 ()
>>     at
>> -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
>> #16 0x00007ffff65cdb25 in ffi_call (cif=,
>>     fn=0x7ffff600a3b6 , rvalue=,
>>     avalue=0x7fffffffdff0)
>>     at
>> -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
>> #17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
>>     resmem=0x7fffffffe010, restype=, atypes=> out>,
>>     avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 ,
>> flags=4353)
>>     at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
>> #18 _ctypes_callproc (pProc=0x7ffff600a3b6 ,
>>     argtuple=0x7fffffffe0c0, flags=4353, argtypes=,
>>     restype=0x737f08, checker=0x0)
>>     at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
>> #19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=,
>>     inargs=, kwds=0x0)
>>     at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
>> #20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
>>     arg=, kw=) at Objects/abstract.c:2165
>> #21 0x00007ffff7a2c0b2 in do_call (nk=, na=1,
>>     pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
>> #22 call_function (oparg=, pp_stack=0x7fffffffe368)
>>     at Python/ceval.c:4683
>> #23 PyEval_EvalFrameEx (f=, throwflag=)
>>     at Python/ceval.c:3185
>> #24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=,
>> ---Type  to continue, or q  to quit---
>>     globals=, locals=, args=,
>>     argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
>>     closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
>> #25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=,
>>     globals=, locals=, args=,
>>     argcount=, kws=, kwcount=0, defs=0x0,
>>     defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
>> #26 0x00007ffff7a2e51b in PyEval_EvalCode (co=,
>>     globals=, locals=) at Python/ceval.c:777
>> #27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
>>     locals=0x7ffff6985488, globals=0x7ffff6985488,
>> filename=0x7ffff67e4090,
>>     mod=0x72f778) at Python/pythonrun.c:970
>> #28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=,
>>     start=, globals=0x7ffff6985488, locals=0x7ffff6985488,
>>     closeit=, flags=0x7fffffffe6b0) at
>> Python/pythonrun.c:923
>> #29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
>>     filename=, closeit=1, flags=0x7fffffffe6b0)
>>     at Python/pythonrun.c:396
>> #30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
>>     filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
>>     fp=0x6e67e0) at Modules/main.c:318
>> #31 Py_Main (argc=, argv=) at
>> Modules/main.c:769
>> #32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
>>     at ./Programs/python.c:69
>> (gdb) list
>> 6    ./Programs/python.c: No such file or directory.
>> (gdb)
>>
>>
>>
>> ________________________________
>> View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
>> Sent from the Csound - General mailing list archive at Nabble.com.
>> 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

Date2016-05-03 17:30
FromAndres Cabrera
SubjectRe: Segmentation Fault Using ctcsound
I've had problems with the stk opcodes on linux. Perhaps if you remove the stk opcode library from OPCODEDIR?

(I didn't read the whole thread so apologies if this is not relavant...)

Cheers,
Andrés

On Tue, May 3, 2016 at 7:36 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
Run in gdb till it crashes (on my computer, "gdb --args
c:/anaconda2/python -i
c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py").

In gdb, set  a breakpoint on csoundOpenLibrary: type "break csoundOpenLibrary"

Type "run" to restart the program. Python will run Csound and stop at
the breakpoint, and the filepath to the library will be printed as the
parameter to csoundOpenLibrary:

    libraryPath=libraryPath@entry=0x22f100
"D:/msys64/home/restore/csound/mingw64/csound-mingw64\\ampmidid.dll")

Type "cont" repeatedly until Csound crashes. The last filepath is the
offending library, so move it out of the directory and try again. Let
me know the name of the offending library. Or there may be some other
problem, in that case email me the text of your gdb session.

The whole session would be something like this:

(gdb) break csoundOpenLibrary
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) [answered Y; input not from terminal]
Starting program: c:\anaconda2\python.exe -i
c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py
[New Thread 3784.0xd64]
libcsound:  <CDLL 'csound64.dll', handle 6c500000 at 1de10b8>
libcsound.csoundCreate: <_FuncPtr object at 0x0000000001E50458>

Breakpoint 4, csoundLoadExternal (csound=0x7f1f10, csound@entry=0x1fe0080,
    libraryPath=libraryPath@entry=0x22f100
"D:/msys64/home/restore/csound/mingw64/csound-mingw64\\ampmidid.dll")
    at D:/msys64/home/restore/csound/Top/csmodule.c:247
247         err = csoundOpenLibrary(&h, libraryPath);
(gdb) cont
Continuing.

Breakpoint 4, csoundLoadExternal (csound=0x7f1f10, csound@entry=0x1fe0080,
    libraryPath=libraryPath@entry=0x22f100
"D:/msys64/home/restore/csound/mingw64/csound-mingw64\\buchla.dll")
    at D:/msys64/home/restore/csound/Top/csmodule.c:247
247         err = csoundOpenLibrary(&h, libraryPath);
(gdb)

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 3, 2016 at 9:57 AM, Mitch Kaufman <mitch.kaufman@hotmail.com> wrote:
> Michael,
>
> I have run Csound countless times through the command line and CsoundQt
> without any problems currently.  As mentioned previously I have also run the
> traditional Python API (i.e., non ctcsound Python) successfully as well with
> this build.
>
> You wrote:
>
> Also in gdb go to stack frame 10 and examine the parameters to
> csoundLoadLibrary and see which library is causing the problem. Move it away
> and try again.
>
> Can you explain how to do this?  I'm not very versed in gdb.
>
> Regards,
> Mitch
>
>
> On May 3, 2016, at 7:49 AM, Michael Gogins <michael.gogins@GMAIL.COM> wrote:
>
> That's great. Csound is crashing when it tries to load some external
> library. The question is why this does not happen if you run Csound on the
> command line in the same environment. Have you tried that?
>
> Also in gdb go to stack frame 10 and examine the parameters to
> csoundLoadLibrary and see which library is causing the problem. Move it away
> and try again.
>
> Regards,
> Mike
>
> On May 3, 2016 12:31 AM, "mitchk" <mitch.kaufman@hotmail.com> wrote:
>>
>> Michael,
>>
>> I don't know if this is precisely what you want but here it is anyway...
>>
>> Regards,
>> Mitch
>>
>> +++
>>
>> [mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i
>> ~/Csound/ctcsound/mkg_ctcsound.py
>> GNU gdb (GDB) 7.11
>> Copyright (C) 2016 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later
>> <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "x86_64-pc-linux-gnu".
>> Type "show configuration" for configuration details.
>> For bug reporting instructions, please see:
>> <http://www.gnu.org/software/gdb/bugs/>.
>> Find the GDB manual and other documentation resources online at:
>> <http://www.gnu.org/software/gdb/documentation/>.
>> For help, type "help".
>> Type "apropos word" to search for commands related to "word"...
>> Reading symbols from /opt/anaconda/bin/python...done.
>> (gdb) break csoundCreate
>> Function "csoundCreate" not defined.
>> Make breakpoint pending on future shared library load? (y or [n]) y
>> Breakpoint 1 (csoundCreate) pending.
>> (gdb) run
>> Starting program: /opt/anaconda/bin/python -i
>> /home/mitch/Csound/ctcsound/mkg_ctcsound.py
>> [Thread debugging using libthread_db enabled]
>> Using host libthread_db library "/usr/lib/libthread_db.so.1".
>> libcsound:  <CDLL 'libcsound64.so', handle 728110 at 0x7ffff67ec128>
>> libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>
>>
>> Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
>>    from /home/mitch/lib/libcsound64.so
>> (gdb) continue
>> Continuing.
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0000000000001730 in ?? ()
>> (gdb) bt
>> #0  0x0000000000001730 in ?? ()
>> #1  0x00007ffff7de83ba in call_init.part () from
>> /lib64/ld-linux-x86-64.so.2
>> #2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
>> #3  0x00007ffff7deca50 in dl_open_worker () from
>> /lib64/ld-linux-x86-64.so.2
>> #4  0x00007ffff7de8264 in _dl_catch_error () from
>> /lib64/ld-linux-x86-64.so.2
>> #5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
>> #6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
>> #7  0x00007ffff7de8264 in _dl_catch_error () from
>> /lib64/ld-linux-x86-64.so.2
>> #8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
>> #9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
>> #10 0x00007ffff6009b47 in csoundOpenLibrary ()
>>    from /home/mitch/lib/libcsound64.so
>> #11 0x00007ffff60087e2 in csoundLoadExternal ()
>>    from /home/mitch/lib/libcsound64.so
>> #12 0x00007ffff60092ed in csoundLoadModules ()
>>    from /home/mitch/lib/libcsound64.so
>> #13 0x00007ffff600f336 in csoundReset () from
>> /home/mitch/lib/libcsound64.so
>> #14 0x00007ffff600a4ec in csoundCreate () from
>> /home/mitch/lib/libcsound64.so
>> #15 0x00007ffff65ce380 in ffi_call_unix64 ()
>>     at
>> -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
>> #16 0x00007ffff65cdb25 in ffi_call (cif=<optimized out>,
>>     fn=0x7ffff600a3b6 <csoundCreate>, rvalue=<optimized out>,
>>     avalue=0x7fffffffdff0)
>>     at
>> -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
>> #17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
>>     resmem=0x7fffffffe010, restype=<optimized out>, atypes=<optimized
>> out>,
>>     avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 <csoundCreate>,
>> flags=4353)
>>     at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
>> #18 _ctypes_callproc (pProc=0x7ffff600a3b6 <csoundCreate>,
>>     argtuple=0x7fffffffe0c0, flags=4353, argtypes=<optimized out>,
>>     restype=0x737f08, checker=0x0)
>>     at -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
>> #19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=<optimized out>,
>>     inargs=<optimized out>, kwds=0x0)
>>     at -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
>> #20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
>>     arg=<optimized out>, kw=<optimized out>) at Objects/abstract.c:2165
>> #21 0x00007ffff7a2c0b2 in do_call (nk=<optimized out>, na=1,
>>     pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at Python/ceval.c:4887
>> #22 call_function (oparg=<optimized out>, pp_stack=0x7fffffffe368)
>>     at Python/ceval.c:4683
>> #23 PyEval_EvalFrameEx (f=<optimized out>, throwflag=<optimized out>)
>>     at Python/ceval.c:3185
>> #24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=<optimized out>,
>> ---Type <return> to continue, or q <return> to quit---
>>     globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
>>     argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
>>     closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
>> #25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=<optimized out>,
>>     globals=<optimized out>, locals=<optimized out>, args=<optimized out>,
>>     argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0,
>>     defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
>> #26 0x00007ffff7a2e51b in PyEval_EvalCode (co=<optimized out>,
>>     globals=<optimized out>, locals=<optimized out>) at Python/ceval.c:777
>> #27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0, flags=0x7fffffffe6b0,
>>     locals=0x7ffff6985488, globals=0x7ffff6985488,
>> filename=0x7ffff67e4090,
>>     mod=0x72f778) at Python/pythonrun.c:970
>> #28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=<optimized out>,
>>     start=<optimized out>, globals=0x7ffff6985488, locals=0x7ffff6985488,
>>     closeit=<optimized out>, flags=0x7fffffffe6b0) at
>> Python/pythonrun.c:923
>> #29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
>>     filename=<optimized out>, closeit=1, flags=0x7fffffffe6b0)
>>     at Python/pythonrun.c:396
>> #30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
>>     filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
>>     fp=0x6e67e0) at Modules/main.c:318
>> #31 Py_Main (argc=<optimized out>, argv=<optimized out>) at
>> Modules/main.c:769
>> #32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
>>     at ./Programs/python.c:69
>> (gdb) list
>> 6    ./Programs/python.c: No such file or directory.
>> (gdb)
>>
>>
>>
>> ________________________________
>> View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
>> Sent from the Csound - General mailing list archive at Nabble.com.
>> 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

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-05-03 17:42
FromMichael Gogins
SubjectRe: Segmentation Fault Using ctcsound
That may be a good clue. Make sure that you have the rawwaves files
and that the RAWWAVE_PATH environment variable is set to indicate the
directory containing those files. This could very definitely cause the
problem.

As Anders says, you can just move the stkops.so out of the directory
to test this theory.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 3, 2016 at 12:30 PM, Andres Cabrera  wrote:
> I've had problems with the stk opcodes on linux. Perhaps if you remove the
> stk opcode library from OPCODEDIR?
>
> (I didn't read the whole thread so apologies if this is not relavant...)
>
> Cheers,
> Andrés
>
> On Tue, May 3, 2016 at 7:36 AM, Michael Gogins 
> wrote:
>>
>> Run in gdb till it crashes (on my computer, "gdb --args
>> c:/anaconda2/python -i
>> c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py").
>>
>> In gdb, set  a breakpoint on csoundOpenLibrary: type "break
>> csoundOpenLibrary"
>>
>> Type "run" to restart the program. Python will run Csound and stop at
>> the breakpoint, and the filepath to the library will be printed as the
>> parameter to csoundOpenLibrary:
>>
>>     libraryPath=libraryPath@entry=0x22f100
>> "D:/msys64/home/restore/csound/mingw64/csound-mingw64\\ampmidid.dll")
>>
>> Type "cont" repeatedly until Csound crashes. The last filepath is the
>> offending library, so move it out of the directory and try again. Let
>> me know the name of the offending library. Or there may be some other
>> problem, in that case email me the text of your gdb session.
>>
>> The whole session would be something like this:
>>
>> (gdb) break csoundOpenLibrary
>> (gdb) run
>> The program being debugged has been started already.
>> Start it from the beginning? (y or n) [answered Y; input not from
>> terminal]
>> Starting program: c:\anaconda2\python.exe -i
>> c:/Users/restore/downloads/ctcsound-master/mkg_ctcsound.py
>> [New Thread 3784.0xd64]
>> libcsound:  
>> libcsound.csoundCreate: <_FuncPtr object at 0x0000000001E50458>
>>
>> Breakpoint 4, csoundLoadExternal (csound=0x7f1f10, csound@entry=0x1fe0080,
>>     libraryPath=libraryPath@entry=0x22f100
>> "D:/msys64/home/restore/csound/mingw64/csound-mingw64\\ampmidid.dll")
>>     at D:/msys64/home/restore/csound/Top/csmodule.c:247
>> 247         err = csoundOpenLibrary(&h, libraryPath);
>> (gdb) cont
>> Continuing.
>>
>> Breakpoint 4, csoundLoadExternal (csound=0x7f1f10, csound@entry=0x1fe0080,
>>     libraryPath=libraryPath@entry=0x22f100
>> "D:/msys64/home/restore/csound/mingw64/csound-mingw64\\buchla.dll")
>>     at D:/msys64/home/restore/csound/Top/csmodule.c:247
>> 247         err = csoundOpenLibrary(&h, libraryPath);
>> (gdb)
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Tue, May 3, 2016 at 9:57 AM, Mitch Kaufman 
>> wrote:
>> > Michael,
>> >
>> > I have run Csound countless times through the command line and CsoundQt
>> > without any problems currently.  As mentioned previously I have also run
>> > the
>> > traditional Python API (i.e., non ctcsound Python) successfully as well
>> > with
>> > this build.
>> >
>> > You wrote:
>> >
>> > Also in gdb go to stack frame 10 and examine the parameters to
>> > csoundLoadLibrary and see which library is causing the problem. Move it
>> > away
>> > and try again.
>> >
>> > Can you explain how to do this?  I'm not very versed in gdb.
>> >
>> > Regards,
>> > Mitch
>> >
>> >
>> > On May 3, 2016, at 7:49 AM, Michael Gogins 
>> > wrote:
>> >
>> > That's great. Csound is crashing when it tries to load some external
>> > library. The question is why this does not happen if you run Csound on
>> > the
>> > command line in the same environment. Have you tried that?
>> >
>> > Also in gdb go to stack frame 10 and examine the parameters to
>> > csoundLoadLibrary and see which library is causing the problem. Move it
>> > away
>> > and try again.
>> >
>> > Regards,
>> > Mike
>> >
>> > On May 3, 2016 12:31 AM, "mitchk"  wrote:
>> >>
>> >> Michael,
>> >>
>> >> I don't know if this is precisely what you want but here it is
>> >> anyway...
>> >>
>> >> Regards,
>> >> Mitch
>> >>
>> >> +++
>> >>
>> >> [mitch@mitcharch ctcsound]$ gdb --args /opt/anaconda/bin/python -i
>> >> ~/Csound/ctcsound/mkg_ctcsound.py
>> >> GNU gdb (GDB) 7.11
>> >> Copyright (C) 2016 Free Software Foundation, Inc.
>> >> License GPLv3+: GNU GPL version 3 or later
>> >> 
>> >> This is free software: you are free to change and redistribute it.
>> >> There is NO WARRANTY, to the extent permitted by law.  Type "show
>> >> copying"
>> >> and "show warranty" for details.
>> >> This GDB was configured as "x86_64-pc-linux-gnu".
>> >> Type "show configuration" for configuration details.
>> >> For bug reporting instructions, please see:
>> >> .
>> >> Find the GDB manual and other documentation resources online at:
>> >> .
>> >> For help, type "help".
>> >> Type "apropos word" to search for commands related to "word"...
>> >> Reading symbols from /opt/anaconda/bin/python...done.
>> >> (gdb) break csoundCreate
>> >> Function "csoundCreate" not defined.
>> >> Make breakpoint pending on future shared library load? (y or [n]) y
>> >> Breakpoint 1 (csoundCreate) pending.
>> >> (gdb) run
>> >> Starting program: /opt/anaconda/bin/python -i
>> >> /home/mitch/Csound/ctcsound/mkg_ctcsound.py
>> >> [Thread debugging using libthread_db enabled]
>> >> Using host libthread_db library "/usr/lib/libthread_db.so.1".
>> >> libcsound:  
>> >> libcsound.csoundCreate: <_FuncPtr object at 0x7ffff69fef20>
>> >>
>> >> Breakpoint 1, 0x00007ffff600a3b6 in csoundCreate ()
>> >>    from /home/mitch/lib/libcsound64.so
>> >> (gdb) continue
>> >> Continuing.
>> >>
>> >> Program received signal SIGSEGV, Segmentation fault.
>> >> 0x0000000000001730 in ?? ()
>> >> (gdb) bt
>> >> #0  0x0000000000001730 in ?? ()
>> >> #1  0x00007ffff7de83ba in call_init.part () from
>> >> /lib64/ld-linux-x86-64.so.2
>> >> #2  0x00007ffff7de84cb in _dl_init () from /lib64/ld-linux-x86-64.so.2
>> >> #3  0x00007ffff7deca50 in dl_open_worker () from
>> >> /lib64/ld-linux-x86-64.so.2
>> >> #4  0x00007ffff7de8264 in _dl_catch_error () from
>> >> /lib64/ld-linux-x86-64.so.2
>> >> #5  0x00007ffff7dec1e7 in _dl_open () from /lib64/ld-linux-x86-64.so.2
>> >> #6  0x00007ffff74c9f09 in ?? () from /usr/lib/libdl.so.2
>> >> #7  0x00007ffff7de8264 in _dl_catch_error () from
>> >> /lib64/ld-linux-x86-64.so.2
>> >> #8  0x00007ffff74ca521 in ?? () from /usr/lib/libdl.so.2
>> >> #9  0x00007ffff74c9fa1 in dlopen () from /usr/lib/libdl.so.2
>> >> #10 0x00007ffff6009b47 in csoundOpenLibrary ()
>> >>    from /home/mitch/lib/libcsound64.so
>> >> #11 0x00007ffff60087e2 in csoundLoadExternal ()
>> >>    from /home/mitch/lib/libcsound64.so
>> >> #12 0x00007ffff60092ed in csoundLoadModules ()
>> >>    from /home/mitch/lib/libcsound64.so
>> >> #13 0x00007ffff600f336 in csoundReset () from
>> >> /home/mitch/lib/libcsound64.so
>> >> #14 0x00007ffff600a4ec in csoundCreate () from
>> >> /home/mitch/lib/libcsound64.so
>> >> #15 0x00007ffff65ce380 in ffi_call_unix64 ()
>> >>     at
>> >>
>> >> -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/unix64.S:76
>> >> #16 0x00007ffff65cdb25 in ffi_call (cif=,
>> >>     fn=0x7ffff600a3b6 , rvalue=,
>> >>     avalue=0x7fffffffdff0)
>> >>     at
>> >>
>> >> -------src-dir-------/Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:525
>> >> #17 0x00007ffff65c55ec in _call_function_pointer (argcount=1,
>> >>     resmem=0x7fffffffe010, restype=, atypes=> >> out>,
>> >>     avalues=0x7fffffffdff0, pProc=0x7ffff600a3b6 ,
>> >> flags=4353)
>> >>     at
>> >> -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:811
>> >> #18 _ctypes_callproc (pProc=0x7ffff600a3b6 ,
>> >>     argtuple=0x7fffffffe0c0, flags=4353, argtypes=,
>> >>     restype=0x737f08, checker=0x0)
>> >>     at
>> >> -------src-dir-------/Python-3.5.1/Modules/_ctypes/callproc.c:1149
>> >> #19 0x00007ffff65bdc53 in PyCFuncPtr_call (self=,
>> >>     inargs=, kwds=0x0)
>> >>     at
>> >> -------src-dir-------/Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
>> >> #20 0x00007ffff7951056 in PyObject_Call (func=0x7ffff69fef20,
>> >>     arg=, kw=) at Objects/abstract.c:2165
>> >> #21 0x00007ffff7a2c0b2 in do_call (nk=, na=1,
>> >>     pp_stack=0x7fffffffe368, func=0x7ffff69fef20) at
>> >> Python/ceval.c:4887
>> >> #22 call_function (oparg=, pp_stack=0x7fffffffe368)
>> >>     at Python/ceval.c:4683
>> >> #23 PyEval_EvalFrameEx (f=, throwflag=)
>> >>     at Python/ceval.c:3185
>> >> #24 0x00007ffff7a2e349 in _PyEval_EvalCodeWithName (_co=> >> out>,
>> >> ---Type  to continue, or q  to quit---
>> >>     globals=, locals=, args=> >> out>,
>> >>     argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0,
>> >>     closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3966
>> >> #25 0x00007ffff7a2e4d8 in PyEval_EvalCodeEx (_co=,
>> >>     globals=, locals=, args=> >> out>,
>> >>     argcount=, kws=, kwcount=0, defs=0x0,
>> >>     defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3987
>> >> #26 0x00007ffff7a2e51b in PyEval_EvalCode (co=,
>> >>     globals=, locals=) at
>> >> Python/ceval.c:777
>> >> #27 0x00007ffff7a53750 in run_mod (arena=0x6e7ea0,
>> >> flags=0x7fffffffe6b0,
>> >>     locals=0x7ffff6985488, globals=0x7ffff6985488,
>> >> filename=0x7ffff67e4090,
>> >>     mod=0x72f778) at Python/pythonrun.c:970
>> >> #28 PyRun_FileExFlags (fp=0x6e67e0, filename_str=,
>> >>     start=, globals=0x7ffff6985488,
>> >> locals=0x7ffff6985488,
>> >>     closeit=, flags=0x7fffffffe6b0) at
>> >> Python/pythonrun.c:923
>> >> #29 0x00007ffff7a54d23 in PyRun_SimpleFileExFlags (fp=0x6e67e0,
>> >>     filename=, closeit=1, flags=0x7fffffffe6b0)
>> >>     at Python/pythonrun.c:396
>> >> #30 0x00007ffff7a6fe97 in run_file (p_cf=0x7fffffffe6b0,
>> >>     filename=0x629070 L"/home/mitch/Csound/ctcsound/mkg_ctcsound.py",
>> >>     fp=0x6e67e0) at Modules/main.c:318
>> >> #31 Py_Main (argc=, argv=) at
>> >> Modules/main.c:769
>> >> #32 0x0000000000400add in main (argc=3, argv=0x7fffffffe828)
>> >>     at ./Programs/python.c:69
>> >> (gdb) list
>> >> 6    ./Programs/python.c: No such file or directory.
>> >> (gdb)
>> >>
>> >>
>> >>
>> >> ________________________________
>> >> View this message in context: RE: [Csnd] Segmentation Fault Using
>> >> ctcsound
>> >> Sent from the Csound - General mailing list archive at Nabble.com.
>> >> 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
>
>
> 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-05-04 11:23
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound
Francois wrote:
+++
So if your default version is Python 3.5.1 from anaconda, a script using csnd6 would normally not work because it needs Python 2.7. I think you have a conflict between native arch linux Python package and your anaconda installation.

Here's what I did on my Ubuntu 14.04 64 bit box:

1) run Anaconda3-4.0.0-Linux-x86_64.sh (downloaded from https://www.continuum.io/downloads). I installed the anaconda3 directory in my home/pinot directory

2) Create a Python2 environment with the following commands (the 3rd command adds a Python2 kernel in Jupyter):
conda create -n ipykernel_py2 python=2 ipykernel anaconda
source activate ipykernel_py2
python -m ipykernel install --user

3) When I build csound, I first activate the Python2 environment with the command:
source activate ipykernel_py2
Then I build Csound.

Francois

+++

Francois,

I followed these instructions and then built csound using the build instructions for "General Linux without root access."  In the Custom.cmake file I added the anaconda python path for the build:

 set(PYTHON_INCLUDE_DIRS "/home/mitch/anaconda3/envs/ipykernel_py2/include/python2.7")

When I execute the CMAKE instruction it's still referring to the installed python instance from Arch:

-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")

I'm sure this is not right.  The CMakeCache.txt file seems to retain the above as the library.  Is there anything else that needs to go in the Custom.cmake file to reference the proper libraries?  Here is the full output from my CMAKE:

(ipykernel_py2)[mitch@mitcharch build]$ cmake -DCMAKE_INSTALL_PREFIX=$HOME ..
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- 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++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:11 (include):
  include() given empty file name (ignored).
This warning is for project developers.  Use -Wno-dev to suppress it.

-- /home/mitch/src/csound
-- LIBRARY INSTALL DIR: lib
-- Performing Test HAS_TREE_VECTORIZE
-- Performing Test HAS_TREE_VECTORIZE - Success
-- Performing Test HAS_CXX_TREE_VECTORIZE
-- Performing Test HAS_CXX_TREE_VECTORIZE - Success
-- Performing Test HAS_FAST_MATH
-- Performing Test HAS_FAST_MATH - Success
-- Performing Test HAS_CXX_FAST_MATH
-- Performing Test HAS_CXX_FAST_MATH - Success
-- Performing Test HAS_FPMATH_SSE
-- Performing Test HAS_FPMATH_SSE - Success
-- Performing Test HAS_CXX_FPMATH_SSE
-- Performing Test HAS_CXX_FPMATH_SSE - Success
-- Performing Test HAS_SSE2
-- Performing Test HAS_SSE2 - Success
-- Performing Test HAS_CXX_SSE2
-- Performing Test HAS_CXX_SSE2 - Success
-- Performing Test HAS_OMIT_FRAME_POINTER
-- Performing Test HAS_OMIT_FRAME_POINTER - Success
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER - Success
-- Including Custom.cmake file: /home/mitch/src/csound/Custom.cmake
-- Performing Test HAS_VISIBILITY_HIDDEN
-- Performing Test HAS_VISIBILITY_HIDDEN - Success
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN - Success
-- BUILD_BIN_DIR set to /home/mitch/src/csound/build.
-- BUILD_LIB_DIR set to /home/mitch/src/csound/build.
-- BUILD_PLUGINS_DIR set to /home/mitch/src/csound/build.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp 
-- Boost version: 1.60.0
-- Found CURL: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so (found version "7.45.0")
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found FLTK: /usr/lib64/libfltk_images.so;/usr/lib64/libfltk_forms.so;/usr/lib64/libfltk.so 
-- Found Java: /usr/lib/jvm/java-7-openjdk/bin/java (found version "1.7.0.99")
-- Found JNI: /usr/lib64/jvm/java-7-openjdk/jre/lib/amd64/libjawt.so 
-- Found DEFAULT_MSG: /usr/include/lo 
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARY)
-- Could NOT find MUSICXML (missing:  MUSICXML_LIBRARY MUSICXML_INCLUDE_DIR)
-- Found PORTSMF: /usr/lib64/libportSMF.so 
-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")
-- Found STK: /usr/lib64/libstk.so 
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- Could NOT find VSTSDK2X (missing:  VSTSDK2X_INCLUDE_DIR)
-- Performing Test HAVE_ATOMIC_BUILTIN
-- Performing Test HAVE_ATOMIC_BUILTIN - Success
-- Using atomic builtins.
-- Looking for libintl.h
-- Looking for libintl.h - found
-- Looking for C++ include eigen3/Eigen/Dense
-- Looking for C++ include eigen3/Eigen/Dense - found
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.7")
-- Looking for lrint in m
-- Looking for lrint in m - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for values.h
-- Looking for values.h - found
-- Looking for winsock.h
-- Looking for winsock.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- USE_LRINT is enabled.
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Looking for pthread_spin_lock
-- Looking for pthread_spin_lock - found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - found
-- USE_OPEN_MP is enabled.
-- Not building with score parser.
-- Not building with new parser debugging.
-- Building with multicore support.
-- USE_GETTEXT is enabled.
-- Using GNU gettext.
-- Setting textdomain to /home/mitch/share/locale.
-- Building on Linux.
--   ADDING LIBRT LIBRARY: /usr/lib64/librt.so.
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for strtod_l
-- Looking for strtod_l - found
-- Looking for sprintf_l
-- Looking for sprintf_l - not found
-- Looking for _strtok_r
-- Looking for _strtok_r - not found
-- Looking for _strtod_l
-- Looking for _strtod_l - not found
-- Looking for _sprintf_l
-- Looking for _sprintf_l - not found
-- Boost version: 1.60.0
-- Looking for ladspa.h
-- Looking for ladspa.h - found
-- Looking for fluidsynth.h
-- Looking for fluidsynth.h - found
-- Looking for jack/jack.h
-- Looking for jack/jack.h - found
-- Looking for C++ include gmm/gmm.h
-- Looking for C++ include gmm/gmm.h - found
-- Looking for lo/lo.h
-- Looking for lo/lo.h - found
-- Found ZLIB: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libz.so (found version "1.2.8")
-- Found PNG: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libpng.so (found version "1.6.17")
-- Looking for wiiuse.h
-- Looking for wiiuse.h - not found
-- Looking for p5glove.h
-- Looking for p5glove.h - not found
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- BUILD_CHUA_OPCODES is enabled.
-- BUILD_DSSI_OPCODES is enabled.
-- BUILD_FLUID_OPCODES is enabled.
-- BUILD_JACK_OPCODES is enabled.
-- BUILD_LINEAR_ALGEBRA_OPCODES is enabled.
-- BUILD_OSC_OPCODES is enabled.
-- BUILD_IMAGE_OPCODES is enabled.
-- BUILD_PYTHON_OPCODES is enabled.
-- BUILD_LUA_OPCODES is enabled.
-- WIIUSE_H="", so disabling BUILD_WIIMOTE_OPCODES
-- WIIUSE_LIB="WIIUSE_LIB-NOTFOUND", so disabling BUILD_WIIMOTE_OPCODES
-- BUILD_WIIMOTE_OPCODES is disabled.
-- P5GLOVE_H="", so disabling BUILD_P5GLOVE_OPCODES
-- BUILD_P5GLOVE_OPCODES is disabled.
-- BUILD_FAUST_OPCODES is disabled.
-- BUILD_VST4CS_OPCODES is disabled.
-- VSTSDK2X_INCLUDE_DIR: VSTSDK2X_INCLUDE_DIR-NOTFOUND
-- BUILD_STK_OPCODES is enabled.
-- Building STK opcodes.
-- Looking for hdf5.h
-- Looking for hdf5.h - not found
-- HDF5_H="", so disabling BUILD_HDF5_OPCODES
-- BUILD_HDF5_OPCODES is disabled.
-- websockets_library="websockets_library-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- WEBSOCKETS_H="WEBSOCKETS_H-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- LIBWEBSOCKET_CANCEL_SERVICE="", so disabling BUILD_WEBSOCKET_OPCODE
-- BUILD_WEBSOCKET_OPCODE is disabled.
--
-- ## REALTIME AUDIO AND MIDI ##
-- Looking for alsa/asoundlib.h
-- Looking for alsa/asoundlib.h - found
-- Looking for pulse/simple.h
-- Looking for pulse/simple.h - found
-- APPLE="", so disabling USE_COREMIDI
-- COREMIDI_INCLUDE_PATH="COREMIDI_INCLUDE_PATH-NOTFOUND", so disabling USE_COREMIDI
-- COREMIDI_LIBRARY="COREMIDI_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- USE_COREMIDI is disabled.
-- APPLE="", so disabling USE_AUDIOUNIT
-- COREAUDIO_INCLUDE_PATH="COREAUDIO_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREAUDIO_LIBRARY="COREAUDIO_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_INCLUDE_PATH="AUDIOUNIT_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_LIBRARY="AUDIOUNIT_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- USE_AUDIOUNIT is disabled.
-- USE_ALSA is enabled.
-- USE_PULSEAUDIO is enabled.
-- USE_PORTAUDIO is enabled.
-- Building rtpa module.
-- USE_PORTMIDI is enabled.
-- USE_JACK is enabled.
-- USE_FLTK is enabled.
-- BUILD_VIRTUAL_KEYBOARD is enabled.
--
-- Building C++ interface library.
-- Found SWIG: /usr/bin/swig (found suitable version "3.0.8", minimum required is "2.0")
-- PYTHON_LIBRARY: /usr/lib64/libpython3.5m.so
-- BUILD_PYTHON_INTERFACE is enabled.
-- BUILD_JAVA_INTERFACE is enabled.
-- BUILD_LUA_INTERFACE is enabled.
-- JNI INCLUDE set to /usr/lib/jvm/default/include;/usr/lib/jvm/default/include/linux;/usr/lib/jvm/default/include.
-- Building csLadspa.
-- BUILD_CSBEATS is enabled.
-- BUILD_PD_CLASS is enabled.
-- BUILD_WINSOUND is disabled.
-- Boost version: 1.60.0
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- BUILD_CSOUND_AC is enabled.
-- BUILD_CSOUND_AC_PYTHON_INTERFACE is enabled.
-- BUILD_CSOUND_AC_LUA_INTERFACE is enabled.
-- USE_SYSTEM_PORTSMF is disabled.
-- Building CsoundAC Python interface.
-- Building CsoundAC Lua interface.
-- BUILD_CSOUNDVST is disabled.
-- BUILD_CSOUNDVST: OFF.
-- Not building csound~ for Max/MSP
-- MAX_SDK_ROOT is not defined.
-- CUNIT_LIBRARY="CUNIT_LIBRARY-NOTFOUND", so disabling BUILD_TESTS
-- BUILD_STATIC_LIBRARY="OFF", so disabling BUILD_TESTS
-- BUILD_TESTS is disabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mitch/src/csound/build
(ipykernel_py2)[mitch@mitcharch build]$

Regards,
Mitch 




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-05 08:10
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
On my system, custom.cmake is ignored too. Try something like this:

source activate ipykernel_py
cmake -DPYTHON_LIBRARY="/home/mitch/anaconda3/envs/ipykernel_py2/lib/libpython2.7.so" ../csound

Francois

2016-05-04 12:23 GMT+02:00 mitchk <mitch.kaufman@hotmail.com>:
Francois wrote:
+++
So if your default version is Python 3.5.1 from anaconda, a script using csnd6 would normally not work because it needs Python 2.7. I think you have a conflict between native arch linux Python package and your anaconda installation.

Here's what I did on my Ubuntu 14.04 64 bit box:

1) run Anaconda3-4.0.0-Linux-x86_64.sh (downloaded from https://www.continuum.io/downloads). I installed the anaconda3 directory in my home/pinot directory

2) Create a Python2 environment with the following commands (the 3rd command adds a Python2 kernel in Jupyter):
conda create -n ipykernel_py2 python=2 ipykernel anaconda
source activate ipykernel_py2
python -m ipykernel install --user

3) When I build csound, I first activate the Python2 environment with the command:
source activate ipykernel_py2
Then I build Csound.

Francois

+++

Francois,

I followed these instructions and then built csound using the build instructions for "General Linux without root access."  In the Custom.cmake file I added the anaconda python path for the build:

 set(PYTHON_INCLUDE_DIRS "/home/mitch/anaconda3/envs/ipykernel_py2/include/python2.7")

When I execute the CMAKE instruction it's still referring to the installed python instance from Arch:

-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")

I'm sure this is not right.  The CMakeCache.txt file seems to retain the above as the library.  Is there anything else that needs to go in the Custom.cmake file to reference the proper libraries?  Here is the full output from my CMAKE:

(ipykernel_py2)[mitch@mitcharch build]$ cmake -DCMAKE_INSTALL_PREFIX=$HOME ..
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- 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++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:11 (include):
  include() given empty file name (ignored).
This warning is for project developers.  Use -Wno-dev to suppress it.

-- /home/mitch/src/csound
-- LIBRARY INSTALL DIR: lib
-- Performing Test HAS_TREE_VECTORIZE
-- Performing Test HAS_TREE_VECTORIZE - Success
-- Performing Test HAS_CXX_TREE_VECTORIZE
-- Performing Test HAS_CXX_TREE_VECTORIZE - Success
-- Performing Test HAS_FAST_MATH
-- Performing Test HAS_FAST_MATH - Success
-- Performing Test HAS_CXX_FAST_MATH
-- Performing Test HAS_CXX_FAST_MATH - Success
-- Performing Test HAS_FPMATH_SSE
-- Performing Test HAS_FPMATH_SSE - Success
-- Performing Test HAS_CXX_FPMATH_SSE
-- Performing Test HAS_CXX_FPMATH_SSE - Success
-- Performing Test HAS_SSE2
-- Performing Test HAS_SSE2 - Success
-- Performing Test HAS_CXX_SSE2
-- Performing Test HAS_CXX_SSE2 - Success
-- Performing Test HAS_OMIT_FRAME_POINTER
-- Performing Test HAS_OMIT_FRAME_POINTER - Success
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER - Success
-- Including Custom.cmake file: /home/mitch/src/csound/Custom.cmake
-- Performing Test HAS_VISIBILITY_HIDDEN
-- Performing Test HAS_VISIBILITY_HIDDEN - Success
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN - Success
-- BUILD_BIN_DIR set to /home/mitch/src/csound/build.
-- BUILD_LIB_DIR set to /home/mitch/src/csound/build.
-- BUILD_PLUGINS_DIR set to /home/mitch/src/csound/build.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp 
-- Boost version: 1.60.0
-- Found CURL: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so (found version "7.45.0")
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found FLTK: /usr/lib64/libfltk_images.so;/usr/lib64/libfltk_forms.so;/usr/lib64/libfltk.so 
-- Found Java: /usr/lib/jvm/java-7-openjdk/bin/java (found version "1.7.0.99")
-- Found JNI: /usr/lib64/jvm/java-7-openjdk/jre/lib/amd64/libjawt.so 
-- Found DEFAULT_MSG: /usr/include/lo 
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARY)
-- Could NOT find MUSICXML (missing:  MUSICXML_LIBRARY MUSICXML_INCLUDE_DIR)
-- Found PORTSMF: /usr/lib64/libportSMF.so 
-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")
-- Found STK: /usr/lib64/libstk.so 
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- Could NOT find VSTSDK2X (missing:  VSTSDK2X_INCLUDE_DIR)
-- Performing Test HAVE_ATOMIC_BUILTIN
-- Performing Test HAVE_ATOMIC_BUILTIN - Success
-- Using atomic builtins.
-- Looking for libintl.h
-- Looking for libintl.h - found
-- Looking for C++ include eigen3/Eigen/Dense
-- Looking for C++ include eigen3/Eigen/Dense - found
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.7")
-- Looking for lrint in m
-- Looking for lrint in m - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for values.h
-- Looking for values.h - found
-- Looking for winsock.h
-- Looking for winsock.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- USE_LRINT is enabled.
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Looking for pthread_spin_lock
-- Looking for pthread_spin_lock - found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - found
-- USE_OPEN_MP is enabled.
-- Not building with score parser.
-- Not building with new parser debugging.
-- Building with multicore support.
-- USE_GETTEXT is enabled.
-- Using GNU gettext.
-- Setting textdomain to /home/mitch/share/locale.
-- Building on Linux.
--   ADDING LIBRT LIBRARY: /usr/lib64/librt.so.
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for strtod_l
-- Looking for strtod_l - found
-- Looking for sprintf_l
-- Looking for sprintf_l - not found
-- Looking for _strtok_r
-- Looking for _strtok_r - not found
-- Looking for _strtod_l
-- Looking for _strtod_l - not found
-- Looking for _sprintf_l
-- Looking for _sprintf_l - not found
-- Boost version: 1.60.0
-- Looking for ladspa.h
-- Looking for ladspa.h - found
-- Looking for fluidsynth.h
-- Looking for fluidsynth.h - found
-- Looking for jack/jack.h
-- Looking for jack/jack.h - found
-- Looking for C++ include gmm/gmm.h
-- Looking for C++ include gmm/gmm.h - found
-- Looking for lo/lo.h
-- Looking for lo/lo.h - found
-- Found ZLIB: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libz.so (found version "1.2.8")
-- Found PNG: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libpng.so (found version "1.6.17")
-- Looking for wiiuse.h
-- Looking for wiiuse.h - not found
-- Looking for p5glove.h
-- Looking for p5glove.h - not found
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- BUILD_CHUA_OPCODES is enabled.
-- BUILD_DSSI_OPCODES is enabled.
-- BUILD_FLUID_OPCODES is enabled.
-- BUILD_JACK_OPCODES is enabled.
-- BUILD_LINEAR_ALGEBRA_OPCODES is enabled.
-- BUILD_OSC_OPCODES is enabled.
-- BUILD_IMAGE_OPCODES is enabled.
-- BUILD_PYTHON_OPCODES is enabled.
-- BUILD_LUA_OPCODES is enabled.
-- WIIUSE_H="", so disabling BUILD_WIIMOTE_OPCODES
-- WIIUSE_LIB="WIIUSE_LIB-NOTFOUND", so disabling BUILD_WIIMOTE_OPCODES
-- BUILD_WIIMOTE_OPCODES is disabled.
-- P5GLOVE_H="", so disabling BUILD_P5GLOVE_OPCODES
-- BUILD_P5GLOVE_OPCODES is disabled.
-- BUILD_FAUST_OPCODES is disabled.
-- BUILD_VST4CS_OPCODES is disabled.
-- VSTSDK2X_INCLUDE_DIR: VSTSDK2X_INCLUDE_DIR-NOTFOUND
-- BUILD_STK_OPCODES is enabled.
-- Building STK opcodes.
-- Looking for hdf5.h
-- Looking for hdf5.h - not found
-- HDF5_H="", so disabling BUILD_HDF5_OPCODES
-- BUILD_HDF5_OPCODES is disabled.
-- websockets_library="websockets_library-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- WEBSOCKETS_H="WEBSOCKETS_H-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- LIBWEBSOCKET_CANCEL_SERVICE="", so disabling BUILD_WEBSOCKET_OPCODE
-- BUILD_WEBSOCKET_OPCODE is disabled.
--
-- ## REALTIME AUDIO AND MIDI ##
-- Looking for alsa/asoundlib.h
-- Looking for alsa/asoundlib.h - found
-- Looking for pulse/simple.h
-- Looking for pulse/simple.h - found
-- APPLE="", so disabling USE_COREMIDI
-- COREMIDI_INCLUDE_PATH="COREMIDI_INCLUDE_PATH-NOTFOUND", so disabling USE_COREMIDI
-- COREMIDI_LIBRARY="COREMIDI_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- USE_COREMIDI is disabled.
-- APPLE="", so disabling USE_AUDIOUNIT
-- COREAUDIO_INCLUDE_PATH="COREAUDIO_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREAUDIO_LIBRARY="COREAUDIO_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_INCLUDE_PATH="AUDIOUNIT_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_LIBRARY="AUDIOUNIT_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- USE_AUDIOUNIT is disabled.
-- USE_ALSA is enabled.
-- USE_PULSEAUDIO is enabled.
-- USE_PORTAUDIO is enabled.
-- Building rtpa module.
-- USE_PORTMIDI is enabled.
-- USE_JACK is enabled.
-- USE_FLTK is enabled.
-- BUILD_VIRTUAL_KEYBOARD is enabled.
--
-- Building C++ interface library.
-- Found SWIG: /usr/bin/swig (found suitable version "3.0.8", minimum required is "2.0")
-- PYTHON_LIBRARY: /usr/lib64/libpython3.5m.so
-- BUILD_PYTHON_INTERFACE is enabled.
-- BUILD_JAVA_INTERFACE is enabled.
-- BUILD_LUA_INTERFACE is enabled.
-- JNI INCLUDE set to /usr/lib/jvm/default/include;/usr/lib/jvm/default/include/linux;/usr/lib/jvm/default/include.
-- Building csLadspa.
-- BUILD_CSBEATS is enabled.
-- BUILD_PD_CLASS is enabled.
-- BUILD_WINSOUND is disabled.
-- Boost version: 1.60.0
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- BUILD_CSOUND_AC is enabled.
-- BUILD_CSOUND_AC_PYTHON_INTERFACE is enabled.
-- BUILD_CSOUND_AC_LUA_INTERFACE is enabled.
-- USE_SYSTEM_PORTSMF is disabled.
-- Building CsoundAC Python interface.
-- Building CsoundAC Lua interface.
-- BUILD_CSOUNDVST is disabled.
-- BUILD_CSOUNDVST: OFF.
-- Not building csound~ for Max/MSP
-- MAX_SDK_ROOT is not defined.
-- CUNIT_LIBRARY="CUNIT_LIBRARY-NOTFOUND", so disabling BUILD_TESTS
-- BUILD_STATIC_LIBRARY="OFF", so disabling BUILD_TESTS
-- BUILD_TESTS is disabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mitch/src/csound/build
(ipykernel_py2)[mitch@mitcharch build]$

Regards,
Mitch 




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-05 11:56
Frommitchk
SubjectRe: Segmentation Fault Using ctcsound

That seemed to work much better by pointing to the correct libraries all around, but the "make install" errored here:

[ 71%] Linking CXX executable ../csdebugger
/home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so.4: undefined reference to `SSLv3_client_method'
/home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so.4: undefined reference to `SSLv2_client_method'
collect2: error: ld returned 1 exit status
frontends/CMakeFiles/csdebugger.dir/build.make:95: recipe for target 'csdebugger' failed
make[2]: *** [csdebugger] Error 1
CMakeFiles/Makefile2:2101: recipe for target 'frontends/CMakeFiles/csdebugger.dir/all' failed
make[1]: *** [frontends/CMakeFiles/csdebugger.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
(ipykernel_py2)[mitch@mitcharch build]$

Regards,
Mitch

Date: Thu, 5 May 2016 00:11:26 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

On my system, custom.cmake is ignored too. Try something like this:

source activate ipykernel_py
cmake -DPYTHON_LIBRARY="/home/mitch/anaconda3/envs/ipykernel_py2/lib/libpython2.7.so" ../csound

Francois

2016-05-04 12:23 GMT+02:00 mitchk <[hidden email]>:
Francois wrote:
+++
So if your default version is Python 3.5.1 from anaconda, a script using csnd6 would normally not work because it needs Python 2.7. I think you have a conflict between native arch linux Python package and your anaconda installation.

Here's what I did on my Ubuntu 14.04 64 bit box:

1) run Anaconda3-4.0.0-Linux-x86_64.sh (downloaded from https://www.continuum.io/downloads). I installed the anaconda3 directory in my home/pinot directory

2) Create a Python2 environment with the following commands (the 3rd command adds a Python2 kernel in Jupyter):
conda create -n ipykernel_py2 python=2 ipykernel anaconda
source activate ipykernel_py2
python -m ipykernel install --user

3) When I build csound, I first activate the Python2 environment with the command:
source activate ipykernel_py2
Then I build Csound.

Francois

+++

Francois,

I followed these instructions and then built csound using the build instructions for "General Linux without root access."  In the Custom.cmake file I added the anaconda python path for the build:

 set(PYTHON_INCLUDE_DIRS "/home/mitch/anaconda3/envs/ipykernel_py2/include/python2.7")

When I execute the CMAKE instruction it's still referring to the installed python instance from Arch:

-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")

I'm sure this is not right.  The CMakeCache.txt file seems to retain the above as the library.  Is there anything else that needs to go in the Custom.cmake file to reference the proper libraries?  Here is the full output from my CMAKE:

(ipykernel_py2)[mitch@mitcharch build]$ cmake -DCMAKE_INSTALL_PREFIX=$HOME ..
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- 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++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:11 (include):
  include() given empty file name (ignored).
This warning is for project developers.  Use -Wno-dev to suppress it.

-- /home/mitch/src/csound
-- LIBRARY INSTALL DIR: lib
-- Performing Test HAS_TREE_VECTORIZE
-- Performing Test HAS_TREE_VECTORIZE - Success
-- Performing Test HAS_CXX_TREE_VECTORIZE
-- Performing Test HAS_CXX_TREE_VECTORIZE - Success
-- Performing Test HAS_FAST_MATH
-- Performing Test HAS_FAST_MATH - Success
-- Performing Test HAS_CXX_FAST_MATH
-- Performing Test HAS_CXX_FAST_MATH - Success
-- Performing Test HAS_FPMATH_SSE
-- Performing Test HAS_FPMATH_SSE - Success
-- Performing Test HAS_CXX_FPMATH_SSE
-- Performing Test HAS_CXX_FPMATH_SSE - Success
-- Performing Test HAS_SSE2
-- Performing Test HAS_SSE2 - Success
-- Performing Test HAS_CXX_SSE2
-- Performing Test HAS_CXX_SSE2 - Success
-- Performing Test HAS_OMIT_FRAME_POINTER
-- Performing Test HAS_OMIT_FRAME_POINTER - Success
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER - Success
-- Including Custom.cmake file: /home/mitch/src/csound/Custom.cmake
-- Performing Test HAS_VISIBILITY_HIDDEN
-- Performing Test HAS_VISIBILITY_HIDDEN - Success
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN - Success
-- BUILD_BIN_DIR set to /home/mitch/src/csound/build.
-- BUILD_LIB_DIR set to /home/mitch/src/csound/build.
-- BUILD_PLUGINS_DIR set to /home/mitch/src/csound/build.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp 
-- Boost version: 1.60.0
-- Found CURL: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so (found version "7.45.0")
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found FLTK: /usr/lib64/libfltk_images.so;/usr/lib64/libfltk_forms.so;/usr/lib64/libfltk.so 
-- Found Java: /usr/lib/jvm/java-7-openjdk/bin/java (found version "1.7.0.99")
-- Found JNI: /usr/lib64/jvm/java-7-openjdk/jre/lib/amd64/libjawt.so 
-- Found DEFAULT_MSG: /usr/include/lo 
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARY)
-- Could NOT find MUSICXML (missing:  MUSICXML_LIBRARY MUSICXML_INCLUDE_DIR)
-- Found PORTSMF: /usr/lib64/libportSMF.so 
-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")
-- Found STK: /usr/lib64/libstk.so 
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- Could NOT find VSTSDK2X (missing:  VSTSDK2X_INCLUDE_DIR)
-- Performing Test HAVE_ATOMIC_BUILTIN
-- Performing Test HAVE_ATOMIC_BUILTIN - Success
-- Using atomic builtins.
-- Looking for libintl.h
-- Looking for libintl.h - found
-- Looking for C++ include eigen3/Eigen/Dense
-- Looking for C++ include eigen3/Eigen/Dense - found
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.7")
-- Looking for lrint in m
-- Looking for lrint in m - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for values.h
-- Looking for values.h - found
-- Looking for winsock.h
-- Looking for winsock.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- USE_LRINT is enabled.
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Looking for pthread_spin_lock
-- Looking for pthread_spin_lock - found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - found
-- USE_OPEN_MP is enabled.
-- Not building with score parser.
-- Not building with new parser debugging.
-- Building with multicore support.
-- USE_GETTEXT is enabled.
-- Using GNU gettext.
-- Setting textdomain to /home/mitch/share/locale.
-- Building on Linux.
--   ADDING LIBRT LIBRARY: /usr/lib64/librt.so.
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for strtod_l
-- Looking for strtod_l - found
-- Looking for sprintf_l
-- Looking for sprintf_l - not found
-- Looking for _strtok_r
-- Looking for _strtok_r - not found
-- Looking for _strtod_l
-- Looking for _strtod_l - not found
-- Looking for _sprintf_l
-- Looking for _sprintf_l - not found
-- Boost version: 1.60.0
-- Looking for ladspa.h
-- Looking for ladspa.h - found
-- Looking for fluidsynth.h
-- Looking for fluidsynth.h - found
-- Looking for jack/jack.h
-- Looking for jack/jack.h - found
-- Looking for C++ include gmm/gmm.h
-- Looking for C++ include gmm/gmm.h - found
-- Looking for lo/lo.h
-- Looking for lo/lo.h - found
-- Found ZLIB: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libz.so (found version "1.2.8")
-- Found PNG: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libpng.so (found version "1.6.17")
-- Looking for wiiuse.h
-- Looking for wiiuse.h - not found
-- Looking for p5glove.h
-- Looking for p5glove.h - not found
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- BUILD_CHUA_OPCODES is enabled.
-- BUILD_DSSI_OPCODES is enabled.
-- BUILD_FLUID_OPCODES is enabled.
-- BUILD_JACK_OPCODES is enabled.
-- BUILD_LINEAR_ALGEBRA_OPCODES is enabled.
-- BUILD_OSC_OPCODES is enabled.
-- BUILD_IMAGE_OPCODES is enabled.
-- BUILD_PYTHON_OPCODES is enabled.
-- BUILD_LUA_OPCODES is enabled.
-- WIIUSE_H="", so disabling BUILD_WIIMOTE_OPCODES
-- WIIUSE_LIB="WIIUSE_LIB-NOTFOUND", so disabling BUILD_WIIMOTE_OPCODES
-- BUILD_WIIMOTE_OPCODES is disabled.
-- P5GLOVE_H="", so disabling BUILD_P5GLOVE_OPCODES
-- BUILD_P5GLOVE_OPCODES is disabled.
-- BUILD_FAUST_OPCODES is disabled.
-- BUILD_VST4CS_OPCODES is disabled.
-- VSTSDK2X_INCLUDE_DIR: VSTSDK2X_INCLUDE_DIR-NOTFOUND
-- BUILD_STK_OPCODES is enabled.
-- Building STK opcodes.
-- Looking for hdf5.h
-- Looking for hdf5.h - not found
-- HDF5_H="", so disabling BUILD_HDF5_OPCODES
-- BUILD_HDF5_OPCODES is disabled.
-- websockets_library="websockets_library-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- WEBSOCKETS_H="WEBSOCKETS_H-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- LIBWEBSOCKET_CANCEL_SERVICE="", so disabling BUILD_WEBSOCKET_OPCODE
-- BUILD_WEBSOCKET_OPCODE is disabled.
--
-- ## REALTIME AUDIO AND MIDI ##
-- Looking for alsa/asoundlib.h
-- Looking for alsa/asoundlib.h - found
-- Looking for pulse/simple.h
-- Looking for pulse/simple.h - found
-- APPLE="", so disabling USE_COREMIDI
-- COREMIDI_INCLUDE_PATH="COREMIDI_INCLUDE_PATH-NOTFOUND", so disabling USE_COREMIDI
-- COREMIDI_LIBRARY="COREMIDI_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- USE_COREMIDI is disabled.
-- APPLE="", so disabling USE_AUDIOUNIT
-- COREAUDIO_INCLUDE_PATH="COREAUDIO_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREAUDIO_LIBRARY="COREAUDIO_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_INCLUDE_PATH="AUDIOUNIT_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_LIBRARY="AUDIOUNIT_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- USE_AUDIOUNIT is disabled.
-- USE_ALSA is enabled.
-- USE_PULSEAUDIO is enabled.
-- USE_PORTAUDIO is enabled.
-- Building rtpa module.
-- USE_PORTMIDI is enabled.
-- USE_JACK is enabled.
-- USE_FLTK is enabled.
-- BUILD_VIRTUAL_KEYBOARD is enabled.
--
-- Building C++ interface library.
-- Found SWIG: /usr/bin/swig (found suitable version "3.0.8", minimum required is "2.0")
-- PYTHON_LIBRARY: /usr/lib64/libpython3.5m.so
-- BUILD_PYTHON_INTERFACE is enabled.
-- BUILD_JAVA_INTERFACE is enabled.
-- BUILD_LUA_INTERFACE is enabled.
-- JNI INCLUDE set to /usr/lib/jvm/default/include;/usr/lib/jvm/default/include/linux;/usr/lib/jvm/default/include.
-- Building csLadspa.
-- BUILD_CSBEATS is enabled.
-- BUILD_PD_CLASS is enabled.
-- BUILD_WINSOUND is disabled.
-- Boost version: 1.60.0
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- BUILD_CSOUND_AC is enabled.
-- BUILD_CSOUND_AC_PYTHON_INTERFACE is enabled.
-- BUILD_CSOUND_AC_LUA_INTERFACE is enabled.
-- USE_SYSTEM_PORTSMF is disabled.
-- Building CsoundAC Python interface.
-- Building CsoundAC Lua interface.
-- BUILD_CSOUNDVST is disabled.
-- BUILD_CSOUNDVST: OFF.
-- Not building csound~ for Max/MSP
-- MAX_SDK_ROOT is not defined.
-- CUNIT_LIBRARY="CUNIT_LIBRARY-NOTFOUND", so disabling BUILD_TESTS
-- BUILD_STATIC_LIBRARY="OFF", so disabling BUILD_TESTS
-- BUILD_TESTS is disabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mitch/src/csound/build
(ipykernel_py2)[mitch@mitcharch build]$

Regards,
Mitch 




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749504.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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-05-05 15:03
FromFrancois PINOT
SubjectRe: Segmentation Fault Using ctcsound
The path to install python module is given by PYTHON_MODULE_INSTALL_DIR. This variable is set in csound/CMakeLists.txt (lines 47 to 51).

You can see this information with the following commands:

source activate ipykernel_py2
python -c "import site; print(site.getusersitepackages())
--> /home/pinot/.local/lib/python2.7/site-packages

source activate root
python -c "import site; print(site.getusersitepackages())
--> /home/pinot/.local/lib/python3.5/site-packages

Maybe you' ll have to change manually the owner:group values for those directories before make install can access them.

Francois

2016-05-05 12:56 GMT+02:00 mitchk <mitch.kaufman@hotmail.com>:

That seemed to work much better by pointing to the correct libraries all around, but the "make install" errored here:

[ 71%] Linking CXX executable ../csdebugger
/home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so.4: undefined reference to `SSLv3_client_method'
/home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so.4: undefined reference to `SSLv2_client_method'
collect2: error: ld returned 1 exit status
frontends/CMakeFiles/csdebugger.dir/build.make:95: recipe for target 'csdebugger' failed
make[2]: *** [csdebugger] Error 1
CMakeFiles/Makefile2:2101: recipe for target 'frontends/CMakeFiles/csdebugger.dir/all' failed
make[1]: *** [frontends/CMakeFiles/csdebugger.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
(ipykernel_py2)[mitch@mitcharch build]$

Regards,
Mitch

Date: Thu, 5 May 2016 00:11:26 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: [Csnd] Segmentation Fault Using ctcsound

On my system, custom.cmake is ignored too. Try something like this:

source activate ipykernel_py
cmake -DPYTHON_LIBRARY="/home/mitch/anaconda3/envs/ipykernel_py2/lib/libpython2.7.so" ../csound

Francois

2016-05-04 12:23 GMT+02:00 mitchk <[hidden email]>:
Francois wrote:
+++
So if your default version is Python 3.5.1 from anaconda, a script using csnd6 would normally not work because it needs Python 2.7. I think you have a conflict between native arch linux Python package and your anaconda installation.

Here's what I did on my Ubuntu 14.04 64 bit box:

1) run Anaconda3-4.0.0-Linux-x86_64.sh (downloaded from https://www.continuum.io/downloads). I installed the anaconda3 directory in my home/pinot directory

2) Create a Python2 environment with the following commands (the 3rd command adds a Python2 kernel in Jupyter):
conda create -n ipykernel_py2 python=2 ipykernel anaconda
source activate ipykernel_py2
python -m ipykernel install --user

3) When I build csound, I first activate the Python2 environment with the command:
source activate ipykernel_py2
Then I build Csound.

Francois

+++

Francois,

I followed these instructions and then built csound using the build instructions for "General Linux without root access."  In the Custom.cmake file I added the anaconda python path for the build:

 set(PYTHON_INCLUDE_DIRS "/home/mitch/anaconda3/envs/ipykernel_py2/include/python2.7")

When I execute the CMAKE instruction it's still referring to the installed python instance from Arch:

-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")

I'm sure this is not right.  The CMakeCache.txt file seems to retain the above as the library.  Is there anything else that needs to go in the Custom.cmake file to reference the proper libraries?  Here is the full output from my CMAKE:

(ipykernel_py2)[mitch@mitcharch build]$ cmake -DCMAKE_INSTALL_PREFIX=$HOME ..
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- 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++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at CMakeLists.txt:11 (include):
  include() given empty file name (ignored).
This warning is for project developers.  Use -Wno-dev to suppress it.

-- /home/mitch/src/csound
-- LIBRARY INSTALL DIR: lib
-- Performing Test HAS_TREE_VECTORIZE
-- Performing Test HAS_TREE_VECTORIZE - Success
-- Performing Test HAS_CXX_TREE_VECTORIZE
-- Performing Test HAS_CXX_TREE_VECTORIZE - Success
-- Performing Test HAS_FAST_MATH
-- Performing Test HAS_FAST_MATH - Success
-- Performing Test HAS_CXX_FAST_MATH
-- Performing Test HAS_CXX_FAST_MATH - Success
-- Performing Test HAS_FPMATH_SSE
-- Performing Test HAS_FPMATH_SSE - Success
-- Performing Test HAS_CXX_FPMATH_SSE
-- Performing Test HAS_CXX_FPMATH_SSE - Success
-- Performing Test HAS_SSE2
-- Performing Test HAS_SSE2 - Success
-- Performing Test HAS_CXX_SSE2
-- Performing Test HAS_CXX_SSE2 - Success
-- Performing Test HAS_OMIT_FRAME_POINTER
-- Performing Test HAS_OMIT_FRAME_POINTER - Success
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER
-- Performing Test HAS_CXX_OMIT_FRAME_POINTER - Success
-- Including Custom.cmake file: /home/mitch/src/csound/Custom.cmake
-- Performing Test HAS_VISIBILITY_HIDDEN
-- Performing Test HAS_VISIBILITY_HIDDEN - Success
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN
-- Performing Test HAS_CXX_VISIBILITY_HIDDEN - Success
-- BUILD_BIN_DIR set to /home/mitch/src/csound/build.
-- BUILD_LIB_DIR set to /home/mitch/src/csound/build.
-- BUILD_PLUGINS_DIR set to /home/mitch/src/csound/build.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp 
-- Boost version: 1.60.0
-- Found CURL: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libcurl.so (found version "7.45.0")
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Found FLTK: /usr/lib64/libfltk_images.so;/usr/lib64/libfltk_forms.so;/usr/lib64/libfltk.so 
-- Found Java: /usr/lib/jvm/java-7-openjdk/bin/java (found version "1.7.0.99")
-- Found JNI: /usr/lib64/jvm/java-7-openjdk/jre/lib/amd64/libjawt.so 
-- Found DEFAULT_MSG: /usr/include/lo 
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARY)
-- Could NOT find MUSICXML (missing:  MUSICXML_LIBRARY MUSICXML_INCLUDE_DIR)
-- Found PORTSMF: /usr/lib64/libportSMF.so 
-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found version "3.5.1")
-- Found STK: /usr/lib64/libstk.so 
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- Could NOT find VSTSDK2X (missing:  VSTSDK2X_INCLUDE_DIR)
-- Performing Test HAVE_ATOMIC_BUILTIN
-- Performing Test HAVE_ATOMIC_BUILTIN - Success
-- Using atomic builtins.
-- Looking for libintl.h
-- Looking for libintl.h - found
-- Looking for C++ include eigen3/Eigen/Dense
-- Looking for C++ include eigen3/Eigen/Dense - found
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.7")
-- Looking for lrint in m
-- Looking for lrint in m - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for io.h
-- Looking for io.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for values.h
-- Looking for values.h - found
-- Looking for winsock.h
-- Looking for winsock.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for dirent.h
-- Looking for dirent.h - found
-- USE_LRINT is enabled.
-- Found FLEX: /usr/bin/flex (found version "2.6.0")
-- Found BISON: /usr/bin/bison (found version "3.0.4")
-- Looking for pthread_spin_lock
-- Looking for pthread_spin_lock - found
-- Looking for pthread_barrier_init
-- Looking for pthread_barrier_init - found
-- USE_OPEN_MP is enabled.
-- Not building with score parser.
-- Not building with new parser debugging.
-- Building with multicore support.
-- USE_GETTEXT is enabled.
-- Using GNU gettext.
-- Setting textdomain to /home/mitch/share/locale.
-- Building on Linux.
--   ADDING LIBRT LIBRARY: /usr/lib64/librt.so.
-- Looking for strlcat
-- Looking for strlcat - not found
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for strtod_l
-- Looking for strtod_l - found
-- Looking for sprintf_l
-- Looking for sprintf_l - not found
-- Looking for _strtok_r
-- Looking for _strtok_r - not found
-- Looking for _strtod_l
-- Looking for _strtod_l - not found
-- Looking for _sprintf_l
-- Looking for _sprintf_l - not found
-- Boost version: 1.60.0
-- Looking for ladspa.h
-- Looking for ladspa.h - found
-- Looking for fluidsynth.h
-- Looking for fluidsynth.h - found
-- Looking for jack/jack.h
-- Looking for jack/jack.h - found
-- Looking for C++ include gmm/gmm.h
-- Looking for C++ include gmm/gmm.h - found
-- Looking for lo/lo.h
-- Looking for lo/lo.h - found
-- Found ZLIB: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libz.so (found version "1.2.8")
-- Found PNG: /home/mitch/anaconda3/envs/ipykernel_py2/lib/libpng.so (found version "1.6.17")
-- Looking for wiiuse.h
-- Looking for wiiuse.h - not found
-- Looking for p5glove.h
-- Looking for p5glove.h - not found
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- BUILD_CHUA_OPCODES is enabled.
-- BUILD_DSSI_OPCODES is enabled.
-- BUILD_FLUID_OPCODES is enabled.
-- BUILD_JACK_OPCODES is enabled.
-- BUILD_LINEAR_ALGEBRA_OPCODES is enabled.
-- BUILD_OSC_OPCODES is enabled.
-- BUILD_IMAGE_OPCODES is enabled.
-- BUILD_PYTHON_OPCODES is enabled.
-- BUILD_LUA_OPCODES is enabled.
-- WIIUSE_H="", so disabling BUILD_WIIMOTE_OPCODES
-- WIIUSE_LIB="WIIUSE_LIB-NOTFOUND", so disabling BUILD_WIIMOTE_OPCODES
-- BUILD_WIIMOTE_OPCODES is disabled.
-- P5GLOVE_H="", so disabling BUILD_P5GLOVE_OPCODES
-- BUILD_P5GLOVE_OPCODES is disabled.
-- BUILD_FAUST_OPCODES is disabled.
-- BUILD_VST4CS_OPCODES is disabled.
-- VSTSDK2X_INCLUDE_DIR: VSTSDK2X_INCLUDE_DIR-NOTFOUND
-- BUILD_STK_OPCODES is enabled.
-- Building STK opcodes.
-- Looking for hdf5.h
-- Looking for hdf5.h - not found
-- HDF5_H="", so disabling BUILD_HDF5_OPCODES
-- BUILD_HDF5_OPCODES is disabled.
-- websockets_library="websockets_library-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- WEBSOCKETS_H="WEBSOCKETS_H-NOTFOUND", so disabling BUILD_WEBSOCKET_OPCODE
-- LIBWEBSOCKET_CANCEL_SERVICE="", so disabling BUILD_WEBSOCKET_OPCODE
-- BUILD_WEBSOCKET_OPCODE is disabled.
--
-- ## REALTIME AUDIO AND MIDI ##
-- Looking for alsa/asoundlib.h
-- Looking for alsa/asoundlib.h - found
-- Looking for pulse/simple.h
-- Looking for pulse/simple.h - found
-- APPLE="", so disabling USE_COREMIDI
-- COREMIDI_INCLUDE_PATH="COREMIDI_INCLUDE_PATH-NOTFOUND", so disabling USE_COREMIDI
-- COREMIDI_LIBRARY="COREMIDI_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_COREMIDI
-- USE_COREMIDI is disabled.
-- APPLE="", so disabling USE_AUDIOUNIT
-- COREAUDIO_INCLUDE_PATH="COREAUDIO_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREAUDIO_LIBRARY="COREAUDIO_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_INCLUDE_PATH="AUDIOUNIT_INCLUDE_PATH-NOTFOUND", so disabling USE_AUDIOUNIT
-- AUDIOUNIT_LIBRARY="AUDIOUNIT_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- COREFOUNDATION_LIBRARY="COREFOUNDATION_LIBRARY-NOTFOUND", so disabling USE_AUDIOUNIT
-- USE_AUDIOUNIT is disabled.
-- USE_ALSA is enabled.
-- USE_PULSEAUDIO is enabled.
-- USE_PORTAUDIO is enabled.
-- Building rtpa module.
-- USE_PORTMIDI is enabled.
-- USE_JACK is enabled.
-- USE_FLTK is enabled.
-- BUILD_VIRTUAL_KEYBOARD is enabled.
--
-- Building C++ interface library.
-- Found SWIG: /usr/bin/swig (found suitable version "3.0.8", minimum required is "2.0")
-- PYTHON_LIBRARY: /usr/lib64/libpython3.5m.so
-- BUILD_PYTHON_INTERFACE is enabled.
-- BUILD_JAVA_INTERFACE is enabled.
-- BUILD_LUA_INTERFACE is enabled.
-- JNI INCLUDE set to /usr/lib/jvm/default/include;/usr/lib/jvm/default/include/linux;/usr/lib/jvm/default/include.
-- Building csLadspa.
-- BUILD_CSBEATS is enabled.
-- BUILD_PD_CLASS is enabled.
-- BUILD_WINSOUND is disabled.
-- Boost version: 1.60.0
-- Found SWIG: /usr/bin/swig (found version "3.0.8")
-- BUILD_CSOUND_AC is enabled.
-- BUILD_CSOUND_AC_PYTHON_INTERFACE is enabled.
-- BUILD_CSOUND_AC_LUA_INTERFACE is enabled.
-- USE_SYSTEM_PORTSMF is disabled.
-- Building CsoundAC Python interface.
-- Building CsoundAC Lua interface.
-- BUILD_CSOUNDVST is disabled.
-- BUILD_CSOUNDVST: OFF.
-- Not building csound~ for Max/MSP
-- MAX_SDK_ROOT is not defined.
-- CUNIT_LIBRARY="CUNIT_LIBRARY-NOTFOUND", so disabling BUILD_TESTS
-- BUILD_STATIC_LIBRARY="OFF", so disabling BUILD_TESTS
-- BUILD_TESTS is disabled.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mitch/src/csound/build
(ipykernel_py2)[mitch@mitcharch build]$

Regards,
Mitch 




View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
Csound mailing list [hidden email] 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 [hidden email] 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


If you reply to this email, your message will be added to the discussion below:
http://csound.1045644.n5.nabble.com/Csnd-Segmentation-Fault-Using-ctcsound-tp5749378p5749504.html
To start a new topic under Csound - General, email [hidden email]
To unsubscribe from Csound, click here.
NAML


View this message in context: RE: [Csnd] Segmentation Fault Using ctcsound
Sent from the Csound - General mailing list archive at Nabble.com.
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