Bug 191176 - comms/gammu with mysql installed
Summary: comms/gammu with mysql installed
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 07:07 UTC by Pavel Timofeev
Modified: 2017-05-06 14:52 UTC (History)
3 users (show)

See Also:


Attachments
wrong, don't use it (714 bytes, text/plain)
2014-06-24 08:10 UTC, Pavel Timofeev
no flags Details
Another gammu_smsd rc.d startup script (740 bytes, text/plain)
2014-06-24 09:28 UTC, Lukasz Wasikowski
no flags Details
wrong, don't use it (726 bytes, text/plain)
2014-06-24 10:54 UTC, Pavel Timofeev
no flags Details
100% working rc.d script for gammu-smsd (647 bytes, text/plain)
2014-06-26 08:29 UTC, Pavel Timofeev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2014-06-19 07:07:06 UTC
FreeBSD 10.0-RELEASE amd64, lastest ports tree.

I've noticed some kind of bug.
comms/gammu can't be installed if mysql server is already intalled.
For example, I have mysql55-server installed:
root@timbsd: # pkg info -x mysql
mysql55-client-5.5.38
mysql55-server-5.5.38

When I try to install comms/gammu it interrupts with following messages
...
[ 82%] Building C object gammu/CMakeFiles/gammu.dir/depend/nokia/dct3.c.o
[ 83%] Building C object tests/CMakeFiles/sql-parse-date.dir/sql-parse-date.c.o
[ 83%] Building C object smsd/CMakeFiles/gammu-smsd.dir/main.c.o
[ 83%] Built target smsd
In file included from /usr/ports/comms/gammu/work/gammu-1.33.0/tests/sql-parse-date.c:8:
In file included from /usr/ports/comms/gammu/work/gammu-1.33.0/tests/../smsd/services/sql.h:6:
In file included from /usr/ports/comms/gammu/work/gammu-1.33.0/tests/../smsd/services/../core.h:15:
/usr/ports/comms/gammu/work/gammu-1.33.0/tests/../smsd/services/../services/sql-core.h:34:10: error: 'sql.h' file not found with <angled> include; use "quotes" instead
#include <sql.h>
         ^~~~~~~
         "sql.h"
/usr/ports/comms/gammu/work/gammu-1.33.0/tests/../smsd/services/../services/sql-core.h:35:10: fatal error: 'sqlext.h' file not found
#include <sqlext.h>
         ^
2 errors generated.
--- tests/CMakeFiles/sql-parse-date.dir/sql-parse-date.c.o ---
*** [tests/CMakeFiles/sql-parse-date.dir/sql-parse-date.c.o] Error code 1

make[4]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
1 error

make[4]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
--- tests/CMakeFiles/sql-parse-date.dir/all ---
*** [tests/CMakeFiles/sql-parse-date.dir/all] Error code 2

make[3]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
[ 84%] Building C object gammu/CMakeFiles/gammu.dir/depend/nokia/dct3trac/wmx.c.o
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
--- smsd/CMakeFiles/gammu-smsd.dir/all ---
*** [smsd/CMakeFiles/gammu-smsd.dir/all] Error code 2

make[3]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
--- gammu/CMakeFiles/gammu.dir/all ---
*** [gammu/CMakeFiles/gammu.dir/all] Error code 2

make[3]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
3 errors

make[3]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
--- all ---
*** [all] Error code 2

make[2]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
1 error

make[2]: stopped in /usr/ports/comms/gammu/work/gammu-1.33.0
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/comms/gammu
*** Error code 1

Stop.
make: stopped in /usr/ports/comms/gammu

===>>> make build failed for comms/gammu
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> comms/gammu


To install comms/gammu I have to delete mysql server and client first. After, install it back.
Comment 1 John Marino freebsd_committer freebsd_triage 2014-06-19 12:19:26 UTC
over to maintainer
Comment 2 Pavel Timofeev 2014-06-23 10:58:05 UTC
> To install comms/gammu I have to delete mysql server and client first. After, install it back.

In this case gammu won't have mysql support.

IMO, this port must have option to enable MySQL/PGSQL/ODBC/etc support. Now it tries to detect it automatically and it is bad.
Comment 3 Pavel Timofeev 2014-06-23 11:07:06 UTC
Another problem if you have unixODBC. You can compile gammu if mysql-server is installed, but not unixODBC too.

So there are a lot of problem to resolve.
Comment 4 Boris Samorodov freebsd_committer freebsd_triage 2014-06-23 11:40:16 UTC
(In reply to timp87 from comment #0)

> comms/gammu can't be installed if mysql server is already intalled.

Did you mean "compiled" instead of "installed"?

(In reply to timp87 from comment #3)

> Another problem if you have unixODBC. You can compile gammu if mysql-server
> is installed, but not unixODBC too.

This statement contradicts the previous one. Please, give precise instructions to replicate the error.
Comment 5 Pavel Timofeev 2014-06-23 11:42:48 UTC
1. Install databases/unixODBC
2. Install databases/mysql55-server
3. Try to install comms/gammu

That's all.
Comment 6 Boris Samorodov freebsd_committer freebsd_triage 2014-06-23 11:44:19 UTC
(In reply to timp87 from comment #2)

> IMO, this port must have option to enable MySQL/PGSQL/ODBC/etc support. Now
> it tries to detect it automatically and it is bad.

Agreed. It's a long standing task with I failed to do. As always, patches are welcome. ;-)
Comment 7 Boris Samorodov freebsd_committer freebsd_triage 2014-06-23 12:04:10 UTC
(In reply to timp87 from comment #5)
> 1. Install databases/unixODBC
> 2. Install databases/mysql55-server
> 3. Try to install comms/gammu
> 
> That's all.

Can't reproduce:
-----
%uname -a
FreeBSD srv.bb.tel.ru 10.0-RELEASE-p2 FreeBSD 10.0-RELEASE-p2 #0: Tue Apr 29 17:06:01 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

% pkg info -x ODBC
unixODBC-2.3.2

% pkg info -x mysql55-ser
mysql55-server-5.5.38

% svn info /usr/src
Path: /usr/src
Working Copy Root Path: /usr/src
URL: https://svn0.us-west.freebsd.org/base/releng/10.0
Relative URL: ^/releng/10.0
Repository Root: https://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 266644
Node Kind: directory
Schedule: normal
Last Changed Author: delphij
Last Changed Rev: 265987
Last Changed Date: 2014-05-14 03:22:28 +0400 (ср, 14 май 2014)

% script gammu.log make -C /usr/ports/comms/gammu clean install
Script started on Mon Jun 23 15:59:46 2014
command: make -C /usr/ports/comms/gammu clean install
===>  Cleaning for gammu-1.33.0_1
===>  License GPLv2 accepted by the user
===>  Found saved configuration for gammu-1.33.0_1
===>   gammu-1.33.0_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by gammu-1.33.0_1 for building
===>  Extracting for gammu-1.33.0_1
=> SHA256 Checksum OK for gammu-1.33.0.tar.gz.
===>  Patching for gammu-1.33.0_1
[...]
Compiling lib/python2.7/site-packages/gammu/worker.py ...
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
===>  Installing for gammu-1.33.0_1
===>  Checking if comms/gammu already installed
===>  Switching to root credentials for 'install' target
Password:
===>   Registering installation for gammu-1.33.0_1
Installing gammu-1.33.0_1... done
===>  Returning to user credentials

Script done on Mon Jun 23 16:00:43 2014
-----
Comment 8 Pavel Timofeev 2014-06-23 13:25:13 UTC
> ... Can't reproduce:

To be sure I've just installed fresh FreeBSD 10.0-RELEASE amd64 into virtual machine. Then installed databases/unixODBC, databases/mysql55-server and tried to install comms/gammu. I've got same problem.
I can give you an acces to that virtual machine to prove and to investigate.
Comment 9 Pavel Timofeev 2014-06-24 08:09:51 UTC
I summarize problems with comms/gammu:

1. Problem with compilation when unixODBC and mysql55-server is installed has to be investigated and fixed.

2. MySQL/PgSQL/ODBC/etc have to be an options.

3. All gammu utils has to be compiled to search config file with prefix /usr/local if it's possible. Now it looks like this:
# gammu-smsd-monitor
Can't find file "/etc/gammu-smsdrc"
Failed to read config: Can not open specified file.

4. gammu-smsd-inject falls.
# gammu-smsd-inject -c /usr/local/etc/gammu-smsdrc TEXT 89533507055 -text 'WAZAP!'
Bus error (core dumped)

5. There is no rc.d script for gammu-smsd. It has to be written and added to port.


Sorry, I have really poor knowledge to help you. But I'll try.
I wrote small rc.d script, for example. I'll attach it to this PR.
Comment 10 Pavel Timofeev 2014-06-24 08:10:21 UTC
Created attachment 144084 [details]
wrong, don't use it
Comment 11 Lukasz Wasikowski 2014-06-24 08:27:12 UTC
Ad. 4. FreeBSD 9.2-RELEASE-p8 amd64

gammu-smsd-inject works for me:

# /usr/local/bin/gammu-smsd-inject -c /usr/local/etc/gammu/gammu_smsd.conf TEXT +48xxxxxxxxx -text 'WAZAP!'
gammu-smsd-inject[54744]: Created outbox message OUTC20140624_101858_00_48xxxxxxxxx_sms0.smsbackup
Written message with ID /var/spool/sms/outbox/OUTC20140624_101858_00_48xxxxxxxxx_sms0.smsbackup
Comment 12 Pavel Timofeev 2014-06-24 08:53:55 UTC
> Ad. 4. FreeBSD 9.2-RELEASE-p8 amd64
>
>gammu-smsd-inject works for me:

It's FreeBSD 9, so this problem could be related to clang in FreeBSD 10
Comment 13 Pavel Timofeev 2014-06-24 09:16:45 UTC
Comment on attachment 144084 [details]
wrong, don't use it

Oh, it doesn't work properly :(
I'll try to do another
Comment 14 Lukasz Wasikowski 2014-06-24 09:28:14 UTC
Created attachment 144088 [details]
Another gammu_smsd rc.d startup script

You may try this one, IIRC it worked fine (I stopped using it because now I'm running gammu-smsd under supervisord).
Comment 15 Pavel Timofeev 2014-06-24 10:53:52 UTC
Thank you, Lukasz!
I figured out why my script didn't work and made small correction. Now it works.
Now the choice is bsam's.
Comment 16 Pavel Timofeev 2014-06-24 10:54:12 UTC
Created attachment 144091 [details]
wrong, don't use it
Comment 17 Pavel Timofeev 2014-06-24 11:25:07 UTC
Comment on attachment 144091 [details]
wrong, don't use it

Damn, don't use my scripts ;( It won't work properly once again. That's enough, I won't do it again.
Consider using Lukasz's.
Comment 18 Pavel Timofeev 2014-06-26 08:29:24 UTC
Created attachment 144145 [details]
100% working rc.d script for gammu-smsd

That's what I wanted to provide at first attemp. It works now.
It can be added to comms/gammu/files directory.
There is %%PIDDIR%% (and %%PREFIX%%) macro (?) in this script which has to be replaced with right value from Makefile. I think PIDDIR could be something like /var/run/gammu-sms/ because if you try to run gammu-smsd as unprivileged user (uucp for example) it can't write to normal dir (/var/run/) where another daemon store their pids.
Comment 19 Boris Samorodov freebsd_committer freebsd_triage 2016-10-13 20:48:59 UTC
Back to the pool.