jackaudio/jack1

Jack fails to build

blablack opened this issue · 4 comments

Latest jack1 git fails to compile with the following error.

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c client.c -o libjack_la-client.o >/dev/null 2>&1
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c -o libjack_la-intclient.lo `test -f 'intclient.c' || echo './'`intclient.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c intclient.c  -fPIC -DPIC -o .libs/libjack_la-intclient.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c intclient.c -o libjack_la-intclient.o >/dev/null 2>&1
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c -o libjack_la-messagebuffer.lo `test -f 'messagebuffer.c' || echo './'`messagebuffer.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c messagebuffer.c  -fPIC -DPIC -o .libs/libjack_la-messagebuffer.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c messagebuffer.c -o libjack_la-messagebuffer.o >/dev/null 2>&1
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c -o libjack_la-pool.lo `test -f 'pool.c' || echo './'`pool.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c pool.c  -fPIC -DPIC -o .libs/libjack_la-pool.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c pool.c -o libjack_la-pool.o >/dev/null 2>&1
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall  -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c -o libjack_la-port.lo `test -f 'port.c' || echo './'`port.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_FORTIFY_SOURCE=2 -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -DJACK_LOCATION=\"/usr/bin\" -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -m3dnow -msse -I../config -I.. -I.. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -O3 -fomit-frame-pointer -ffast-math -funroll-loops -march=native -mtune=native -msse -mfpmath=sse -c port.c  -fPIC -DPIC -o .libs/libjack_la-port.o
port.c: In function 'jack_port_rename':
port.c:816:3: error: format not a string literal and no format arguments [-Werror=format-security]
   snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, old_name);
   ^
port.c:816:3: error: format not a string literal and no format arguments [-Werror=format-security]
port.c:817:3: error: format not a string literal and no format arguments [-Werror=format-security]
   snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, new_name);
   ^
port.c:817:3: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors

The patch below fixes the issue.

diff --git a/jack b/jack
index 23c2991..198407e 160000
--- a/jack
+++ b/jack
@@ -1 +1 @@
-Subproject commit 23c29914806edefb496af098e937cc09e472bbbe
+Subproject commit 198407e95611938375ce87cb5ba924d8cff4eb09
diff --git a/jackd/engine.c b/jackd/engine.c
index 26df2bd..eceb2a0 100644
--- a/jackd/engine.c
+++ b/jackd/engine.c
@@ -4670,8 +4670,8 @@ jack_port_rename_notify (jack_engine_t *engine,

    event.type = PortRename;
    event.y.other_id = port->shared->id;
-   snprintf (event.x.name, JACK_PORT_NAME_SIZE-1, old_name);
-   snprintf (event.z.other_name, JACK_PORT_NAME_SIZE-1, new_name);
+   snprintf (event.x.name, JACK_PORT_NAME_SIZE-1, "%s", old_name);
+   snprintf (event.z.other_name, JACK_PORT_NAME_SIZE-1, "%s", new_name);

    for (node = engine->clients; node; node = jack_slist_next (node)) {

diff --git a/libjack/port.c b/libjack/port.c
index 16a11b9..5d42b9f 100644
--- a/libjack/port.c
+++ b/libjack/port.c
@@ -813,8 +813,8 @@ jack_port_rename (jack_client_t* client, jack_port_t *port, const char *new_name
        req.type = PortNameChanged;

        /* re-purpose an appropriate part of the request union to convey the names */
-       snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, old_name);
-       snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, new_name);
+       snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, "%s", old_name);
+       snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, "%s", new_name);

        (void) jack_client_deliver_request (client, &req);
    }
diff --git a/tools b/tools
index 2ea43fc..8623f5b 160000
--- a/tools
+++ b/tools
@@ -1 +1 @@
-Subproject commit 2ea43fc303d0286ba16ffa2a41f1de82f8accb64
+Subproject commit 8623f5bbe18acda56c3463c7d79c37372ec6e1ac

There is already a pull request for this fix.

On Mon, Aug 10, 2015 at 1:10 PM, Aurelien notifications@github.com wrote:

The patch below fixes the issue.

diff --git a/jack b/jack
index 23c2991..198407e 160000
--- a/jack
+++ b/jack
@@ -1 +1 @@
-Subproject commit 23c29914806edefb496af098e937cc09e472bbbe
+Subproject commit 198407e95611938375ce87cb5ba924d8cff4eb09
diff --git a/jackd/engine.c b/jackd/engine.c
index 26df2bd..eceb2a0 100644
--- a/jackd/engine.c
+++ b/jackd/engine.c
@@ -4670,8 +4670,8 @@ jack_port_rename_notify (jack_engine_t *engine,

event.type = PortRename;
event.y.other_id = port->shared->id;
  • snprintf (event.x.name, JACK_PORT_NAME_SIZE-1, old_name);
  • snprintf (event.z.other_name, JACK_PORT_NAME_SIZE-1, new_name);
  • snprintf (event.x.name, JACK_PORT_NAME_SIZE-1, "%s", old_name);
  • snprintf (event.z.other_name, JACK_PORT_NAME_SIZE-1, "%s", new_name);

for (node = engine->clients; node; node = jack_slist_next (node)) {

diff --git a/libjack/port.c b/libjack/port.c
index 16a11b9..5d42b9f 100644
--- a/libjack/port.c
+++ b/libjack/port.c
@@ -813,8 +813,8 @@ jack_port_rename (jack_client_t* client, jack_port_t *port, const char *new_name
req.type = PortNameChanged;

    /* re-purpose an appropriate part of the request union to convey the names */
  •   snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, old_name);
    
  •   snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, new_name);
    
  •   snprintf ((char *) req.x.connect.source_port, JACK_PORT_NAME_SIZE-1, "%s", old_name);
    
  •   snprintf ((char *) req.x.connect.destination_port, JACK_PORT_NAME_SIZE-1, "%s", new_name);
    
    (void) jack_client_deliver_request (client, &req);
    

    }
    diff --git a/tools b/tools
    index 2ea43fc..8623f5b 160000
    --- a/tools
    +++ b/tools
    @@ -1 +1 @@
    -Subproject commit 2ea43fc303d0286ba16ffa2a41f1de82f8accb64
    +Subproject commit 8623f5bbe18acda56c3463c7d79c37372ec6e1ac


Reply to this email directly or view it on GitHub
#26 (comment).

should we close this?

Fix already applied.