Closed palmtown closed 12 months ago
Hello there,
I found that the above issue is generated when building spandsp. Also, I found it is a known issue that was recently introduced as shown at https://github.com/freeswitch/spandsp/issues/51. Using Sed to change the version back to 2.69 works. However, ran into several other errors.
Next error was that the php-config command was not found, commented it out, and now next error is in regards to python as shown below, although python3 is installed. I'm working through the errors.
If anyone has any suggestions or a working repo, that would be great.
ASK [ansible-role-fsmrf : Freeswitch configuration (with extra modules)] *** fatal: [localhost]: FAILED! => {"changed": true, "cmd": "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --with-lws=yes --with-extra=yes", "delta": "0:00:06.945793", "end": "2023-07-10 17:22:24.952720", "msg": "non-zero return code", "rc": 2, "start": "2023-07-10 17:22:18.006927", "stderr": "configure: WARNING: Could not find python, mod_python will not build, use --with-python to specify the location\nconfigure:
Hello again,
Just leaving you with my notes. In short, after investigating your script in detail, I come to find that the main reason for many of the errors is that the FreeSWITCH version this playbook uses is 2 years old, and unfortunately, doesn't have many of the updates that FreeSWITCH includes to compile/work correctly on Debian 11. For example, Debian 11 sets python3 as default, and the newer FreeSWITCH source has support for python3 whereas this repo's version doesn't. Specially, in the ansible-role-fsmrf/files/ which contains some of the modified FreeSWITCH source code.
So far I've found the following requirements to resolve:
You can checkout my new patch version: https://github.com/drachtio/ansible-role-fsmrf/pull/15
We are in the process of updating to freeswitch 1.10.10
@davehorton
I hope all is well. That's great news! Looking forward to your release. More than happy to test it once it is ready.
We are in the process of updating to freeswitch 1.10.10
Good news
please test branch freeswitch-v1.10.10 @palmtown and let me know your results. Should work with either debian 11 or 12
please test branch freeswitch-v1.10.10 @palmtown and let me know your results. Should work with either debian 11 or 12
@davehorton I would be honored. Will post my feedback shortly. Thanks!
@davehorton
Again, thanks for working on this issue. Secondly, I have began testing branch freeswitch-v1.10.10, on Debian 12, and found the below errors of which one (1) I was able to resolve. Testing is ongoing as grpc has been building for 20 minutes, however, will update with my final notes once complete.
The Ansible playbook failed to run. In short, as shown in the Exhibit 1 below, there is a syntax error in the file '/root/ansible-role-fsmrf/tasks/main.yml': line 105, column 15. Specifically, I've found that it is caused by {{drachtio_modules_version}} not being enclosed in quotes. Once I enclosed {{drachtio_modules_version}} with quotes, the script was able to run.
An error occurred at "TASK [ansible-role-fsmrf : patch compiler_settings.cmake and run build]." Although the error occurred, the script continued to run and I noted the log "TASK [ansible-role-fsmrf : attempt rebuild (necessary on Debian 12 for some reason)]." It seems as if the script anticipated the error. Therefore, just noting for reference.
Exhibit 1 Syntax Error while loading YAML. found unacceptable key (unhashable type: 'AnsibleMapping')
The error appears to be in '/root/ansible-role-fsmrf/tasks/main.yml': line 105, column 15, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
dest: /usr/local/src/drachtio-freeswitch-modules
version: {{drachtio_modules_version}}
^ here
We could be wrong, but this one looks like it might be an issue with missing quotes. Always quote template expression brackets when they start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Exhibit 2 TASK [ansible-role-fsmrf : patch compiler_settings.cmake and run build] ***** fatal: [localhost]: FAILED! => ...[TRUNCATED INTENTIONALLY]
fixed first issue
@davehorton
Great! The install just finished and it was successful. Also, I verified FreeSWITCH is running. Having stated that, I can confirm that based on the updates, with the exception of the error you just fixed, I was able to successfully execute the Ansible playbook. The original issue I reported has been resolved.
Now, I will continue my testing.
Much appreciated @davehorton !
the second issue has to with changes I tried to make the aws libs compile on debian 12. Looks like there is still issues. I think I will move them into a conditional. Meanwhile best to test on debian 11 -- is that what you tried?
@davehorton
Note that I tried on Debian 12. I'll try on Debian 11 as well and report back.
I suspect that if you try to reload the aws module mod_aws_transcribe that it might not work
@davehorton
On Debian 12, mod_aws_transcribe seemed to have reloaded successfully as shown in Exhibit 1 below, although, I have not setup authentication yet.
Exhibit 1 +OK log level [7] freeswitch@ip-172-31-6-13> reload mod_aws_transcribe +OK Reloading XML +OK module unloaded +OK module loaded
2023-08-25 22:55:17.830627 79.30% [NOTICE] switch_loadable_module.c:1285 Deleting API Function 'uuid_aws_transcribe' 2023-08-25 22:55:17.830627 79.30% [DEBUG] switch_loadable_module.c:1287 Write lock interface 'uuid_aws_transcribe' to wait for existing references. 2023-08-25 22:55:17.830627 79.30% [CONSOLE] switch_loadable_module.c:2354 Stopping: mod_aws_transcribe 2023-08-25 22:55:17.830627 79.30% [INFO] switch_time.c:1433 Timezone reloaded 1750 definitions 2023-08-25 22:55:17.830627 79.30% [NOTICE] switch_event.c:467 Subclass reservation deleted for mod_aws_transcribe.c:aws_transcribe::transcription 2023-08-25 22:55:17.830627 79.30% [CONSOLE] switch_loadable_module.c:2374 mod_aws_transcribe unloaded. 2023-08-25 22:55:17.830627 79.30% [NOTICE] mod_aws_transcribe.c:216 AWS Speech Transcription API loading.. 2023-08-25 22:55:17.830627 79.30% [NOTICE] aws_transcribe_glue.cpp:359 "AWS_ACCESS_KEY_ID" and/or "AWS_SECRET_ACCESS_KEY" env var not set; authentication will expect channel variables of same names to be set 2023-08-25 22:55:17.830627 79.30% [NOTICE] mod_aws_transcribe.c:222 AWS Speech Transcription API successfully loaded 2023-08-25 22:55:17.830627 79.30% [CONSOLE] switch_loadable_module.c:1772 Successfully Loaded [mod_aws_transcribe] 2023-08-25 22:55:17.830627 79.30% [NOTICE] switch_loadable_module.c:389 Adding API Function 'uuid_aws_transcribe' freeswitch@ip-172-31-6-13> freeswitch@ip-172-31-6-13>
@davehorton
Installation on Debian 11 is running, will update once it has completed with any notes.
@davehorton
Please note that the install failed for Debian 11 as shown in Exhibit 1. However, note that I did not enabled build_with_extra this time. Nonetheless, I've enabled build_with_extra now and re-run to observe the outcome.
Exhibit 1
TASK [ansible-role-fsmrf : FreeSwitch make] ***** fatal: [localhost]: FAILED! => {"changed": true, "cmd": "make -j 4", "delta": "0:00:55.365497", "end": "2023-08-25 23:16:40.322255", "msg": "non-zero return code", "rc": 2, "start": "2023-08-25 23:15:44.956758", "stderr": "config.status: WARNING: 'apr-config.in' seems to ignore the --datarootdir setting\nrm: cannot remove 'libtoolT': No such file or directory\nmake[1]: warning: -j4 forced in submake: resetting jobserver mode.\nmake[1]: warning: -j4 forced in submake: resetting jobserver mode.\naudio_pipe.cpp:266:1: error: too many initializers for ‘const lws_retry_bo_t’ {aka ‘const lws_retry_bo’}\n 266 | };\n...[TRUNCATED INTENTIONALLY].
@davehorton
Please note that on Debian 11, it fails at "TASK [ansible-role-fsmrf : FreeSwitch make]" as described previously, even with build_with_extra enabled.
Hi @davehorton, i got this error:
cmd: mkdir -p build && cd build
cmake .. -DBUILD_DEPS=off -DBUILD_ONLY="lexv2-runtime;transcribestreaming" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS="-Wno-unused-parameter -Wno-error"
make -j 4 && make install
stderr: CMake Error at aws-cpp-sdk-core/CMakeLists.txt:496 (find_package):
By not providing "Findaws-c-event-stream.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"aws-c-event-stream", but CMake did not find one.
Could not find a package configuration file provided by
"aws-c-event-stream" with any of the following names:
aws-c-event-streamConfig.cmake
aws-c-event-stream-config.cmake
Add the installation prefix of "aws-c-event-stream" to CMAKE_PREFIX_PATH or
set "aws-c-event-stream_DIR" to a directory containing one of the above
files. If "aws-c-event-stream" provides a separate development package or
SDK, be sure it has been installed.
make: *** No targets specified and no makefile found. Stop.
I built it on Debian 11.
Because i don't need aws libs, soi've tried to remove all aws libs. But i got another issue:
cmd: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --with-lws=yes --with-extra=yes
stderr: Package libpq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpq' found
./configure: line 34513: php-config: command not found
./configure: line 34514: php-config: command not found
./configure: line 34515: php-config: command not found
./configure: line 34517: php-config: command not found
./configure: line 34518: php-config: command not found
configure: WARNING: Could not find python, mod_python will not build, use --with-python to specify the location
configure: WARNING: python3.9 is unusable
configure: WARNING: Your python3 lacks threads support, can not build mod_python3
configure: WARNING: Could not find erlang, mod_erlang_event will not build, use --with-erlang to specify the location
config.status: error: cannot find input file: `Makefile.in'
should work now for both debian 11 and 12 please retest @palmtown .
For debian 12, its a bit kludgy in that I have to run cmake once for aws-sdk which fails but generates code that I can then patch in a rescue block and build again. So it works fine but you do get some failure messages on the console, followed by a message from me indicated this is expected
@davehorton ,
Good morning! Re-running test... Will update soon.
@davehorton
Please note that the installation on a new instance of Debian 12 failed as shown in Exhibit 1 below. Please note that previously, installation succeeded on exact same Debian 12 instance. However, the aforementioned error did not occur during installation on Debian 11 and the installation is ongoing. I will update once complete.
Exhibit 1 TASK [ansible-role-fsmrf : copy mod_audio_fork into place] ** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, stdin_add_newline, strip_empty_ends."}
PLAY RECAP ** localhost : ok=11 changed=8 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
I think you are not running branch freeswitch-v1.10.10 or else you would have seen a different name for that task
@davehorton
You are absolutely correct, my apologies, I did not checkout the freeswitch-v1.10.10, simply moving too fast this morning.
@davehorton
I am happy to advise that both installations completed successfully with exception that on Debian 12, an anticipated error was caught and handled successfully by the script.
At this time, I have no errors to report.
Debian 12 Output PLAY RECAP ** localhost : ok=60 changed=51 unreachable=0 failed=0 skipped=6 rescued=1 ignored=0
Debian 11 Output PLAY RECAP ** localhost : ok=58 changed=49 unreachable=0 failed=0 skipped=7 rescued=0 ignored=0
merged, tagged as 2.0.0
Hello,
Please note that I have tried to run your playbook, however, the installation fails on a clean deployment of Debian 11 as shown below. I tried updating Autoconf to version 2.7.1, but that generated an error while building libfvad. Any suggestions?
ERROR fatal: [localhost]: FAILED! => {"changed": true, "cmd": "./bootstrap.sh && ./configure && make -j 4 && make install", "delta": "0:00:01.796610", "end": "2023-07-09 17:16:35.885725", "msg": "non-zero return code", "rc": 127, "start": "2023-07-09 17:16:34.089115", "stderr": "mkdir: cannot create directory ‘config’: File exists\nconfigure.ac:21: error: Autoconf version 2.71 or higher is required\nconfigure.ac:21: the top level\nautom4te: /usr/bin/m4 failed with exit status: 63\naclocal: error: /usr/bin/autom4te failed with exit status: 63\nautoreconf: aclocal failed with exit status: 63\n/bin/sh: 1: ./configure: not found", "stderr_lines": ["mkdir: cannot create directory ‘config’: File exists", "configure.ac:21: error: Autoconf version 2.71 or higher is required", "configure.ac:21: the top level", "autom4te: /usr/bin/m4 failed with exit status: 63", "aclocal: error: /usr/bin/autom4te failed with exit status: 63", "autoreconf: aclocal failed with exit status: 63", "/bin/sh: 1: ./configure: not found"], "stdout": "", "stdout_lines": []}
PLAY RECAP ** localhost :ok=16changed=11 unreachable=0failed=1 skipped=0 rescued=0 ignored=0