Bonjour a tous,

j'essaie d'installer sopcast, n'ayant pas de trouver de paquets pour l'installer, je me suis décidé à le compiler. Seulement, la commande "make" me renvoit la chose suivante :
]# make
make  all-recursive
make[1]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0 »
Making all in po
make[2]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/po »
make[2]: Rien à faire pour « all ».
make[2]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/po »
Making all in src
make[2]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/src »
g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I. -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -DGSOPCAST_LOCALEDIR=\""/usr/local/share/locale"\"    -g -O2 -MT fork.o -MD -MP -MF .deps/fork.Tpo -c -o fork.o fork.cc
fork.cc: In function 'gboolean handle_stdout_pipe(GIOChannel*, GIOCondition, void*)':
fork.cc:62: erreur: 'strstr' was not declared in this scope
fork.cc: In function 'void fork_sop(char*)':
fork.cc:118: erreur: 'strdup' was not declared in this scope
fork.cc:125: attention : deprecated conversion from string constant to 'char*'
fork.cc:141: attention : deprecated conversion from string constant to 'char*'
fork.cc: In function 'void fork_player()':
fork.cc:182: erreur: 'strdup' was not declared in this scope
fork.cc:186: erreur: 'strtok_r' was not declared in this scope
fork.cc:189: erreur: 'strcat' was not declared in this scope
fork.cc: In function 'void kill_player()':
fork.cc:254: erreur: 'strcat' was not declared in this scope
fork.cc:257: erreur: 'strcmp' was not declared in this scope
fork.cc:276: erreur: 'memchr' was not declared in this scope
fork.cc:279: erreur: 'strstr' was not declared in this scope
make[2]: *** [fork.o] Erreur 1
make[2]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0 »
make: *** [all] Erreur 2
Avez vous une idée de ce qui manque ?

D'avence merci.
Bonjour,

peux-tu poster le contenu du fichier src/fork.cc dans tes sources ?
Le voila :
/* 
 * This file part of gsopcast - A gtk front-end of p2p tv sopcast.
 * http://lianwei3.googlepages.com/home2
 * Copyright (C) 2006 Wei Lian <lianwei3@gmail.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#include "socket.h"
#include "header.h"
#include "channel.h"
pid_t pid_sop;
pid_t pid_player;
pid_t pid_channel;
int stdout_pipe[2];
int stdin_pipe[2];
char channels_url[64];
char outport[8];
extern GtkWidget *label_player;
extern GtkWidget *entry_player;

//xihels@gmail.com
extern GtkWidget *entry_inport;
extern GtkWidget *entry_outport;
//xihels@gmail.com////////
//-----------------------------------------------------
/*size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE * stream)
{
    return write(stdout_pipe[1], ptr, size * nmemb);
}*/

//-----------------------------------------------------
struct MemoryStruct chunk;
//-----------------------------------------------------
gboolean
handle_stdout_pipe(GIOChannel * source, GIOCondition cond, gpointer d)
{
    GError *error = NULL;    // for error handling 
    GIOStatus status;        // save the reading status 
    gsize bytes_read;        // save the number of chars read 

    if ((status =
     g_io_channel_read_chars(source,
                 chunk.memory + chunk.size,
                 PER_SIZE, &bytes_read,
                 &error)) == G_IO_STATUS_NORMAL
    && bytes_read > 0) {
    chunk.size += bytes_read;
    chunk.memory[chunk.size] = 0;
    if (strstr(chunk.memory, "</channels>")) {
        void channel_list_update(char *);
        channel_list_update(chunk.memory);
        free(chunk.memory);
        chunk.memory = NULL;
    } else
        chunk.memory =
        (char *) realloc(chunk.memory, chunk.size + PER_SIZE + 1);
    }
    return TRUE;
}

//-----------------------------------------------------
////////////////////fork new process
void fork_channel()
{
    if (chunk.memory)
    free(chunk.memory);
    chunk.memory = (char *) malloc(PER_SIZE + 1);
    chunk.size = 0;

    pid_t pid;
    pid = fork();
    if (pid == -1) {
    perror("fork");
    pid_channel = -2;
    exit(-1);
    } else if (pid == 0) {
    int fd = open("/dev/null", O_WRONLY);
    dup2(fd, 2);
    dup2(stdout_pipe[1], 1);
    execlp("wget", "wget", channels_url, "-O", "-", NULL);
/*    CURL *curl = curl_easy_init();
    curl_easy_setopt(curl, CURLOPT_URL, channels_url);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
    curl_easy_perform(curl);
    curl_easy_cleanup(curl);*/
    _exit(0);
    } else {
    // parent 
    pid_channel = pid;
    }

}


//-----------------------------------------------------
void fork_sop(char *play_url)
{
    //////////setting inport and outport
    int i, j;
    char inport[8];
    int sock;
    ///choose inport and outport number
    //xihels@gmail.com
    char *line = strdup(gtk_entry_get_text(GTK_ENTRY(entry_inport)));
    i = atoi(line);
    free(line);
    if (i == 0) {
    //xihels@gmail.com
        while (1) {
            i = rand() % (65536 - 3000) + 3000;    ////3000 to 65535
            sock = connect_to_server("127.0.0.1", i);
            if (sock == -1)
                break;
            else if (sock >= 0)
                close(sock);
        }
    }
    sprintf(inport, "%d", i);


    //xihels@gmail.com
    line = strdup(gtk_entry_get_text(GTK_ENTRY(entry_outport)));
    j = atoi(line);
    if (j == 0) {
        while (1) {
            j = rand() % (65536 - 3000) + 3000;
            sock = connect_to_server("127.0.0.1", j);
            if (sock == -1 && j != i)
                break;
            else if (sock >= 0)
                close(sock);
        }
    }
    sprintf(outport, "%d", j);

    ///////////////////////
    pid_t pid;
    pid = fork();
    if (pid == -1) {
        perror("fork");
        //      pid_sop = -2;
        exit(-1);
    } else if (pid == 0) {
        int fd = open("/dev/null", O_WRONLY);
        dup2(fd, 1);
        execlp("sp-sc", "sp-sc", play_url, inport, outport, NULL);
        perror("sp-sc");
        _exit(-1);
    } else {
        // parent 
        pid_sop = pid;
    }

}



//-----------------------------------------------------
void fork_player()
{
    if (pid_player != -2)
        return;
    ///change color
    GdkColor color;
    gdk_color_parse("blue", &color);
    gtk_widget_modify_fg(label_player, GTK_STATE_NORMAL, &color);
    /////////////////////get player info
    char *line = strdup(gtk_entry_get_text(GTK_ENTRY(entry_player)));
    int iter = 0;
    char *savept;
    char *playopt[32];
    playopt[0] = strtok_r(line, " ,", &savept);
    while ((playopt[++iter] = strtok_r(NULL, " ,", &savept)) != NULL);
    char url[32] = "http://127.0.0.1:";
    strcat(url, outport);
    playopt[iter] = url;
    playopt[++iter] = NULL;
    ///fork 
    pid_t pid = fork();
    if (pid == -1) {
        perror("fork");
        exit(-1);
    } else if (pid == 0) {
        /////////////mask the error output
        int fd = open("/dev/null", O_WRONLY);
        ///clear remaining data
        int nread;
        ioctl(stdin_pipe[0], FIONREAD, &nread);
        char tmp[8];
        while (nread) {
            int n = read(stdin_pipe[0], tmp, sizeof(tmp));
            nread -= n;
        }
        ////
        dup2(stdin_pipe[0], 0);
        dup2(fd, 1);
        dup2(fd, 2);
        /////////////execute command
        execvp(playopt[0], playopt);
        perror("player");
        _exit(-1);
    } else {
        // parent 
        pid_player = pid;
        free(line);
    }

}



///////kill process


//-----------------------------------------------------
void kill_sop()
{
    if (pid_sop > 0) {
        //      if (kill ((pid_t) pid_sop, SIGTERM) == -1)
        ////seems sp-sc can be SIGKILLed without causing any problem 
        kill((pid_t) pid_sop, SIGKILL);
    }
}


//-----------------------------------------------------
void kill_player()
{
    if (pid_player > 0) {
        /*    int kill_player = kill((pid_t) pid_player, SIGTERM);
            if (kill_player == -1)
            kill_player = kill((pid_t) pid_player, SIGKILL);*/
        DIR *dir = opendir("/proc");
        if (!dir) {
            fprintf(stderr, "Cannot open /proc\n");
            exit(1);
        }
        ///loop
        char playerUrl[64] = "http://127.0.0.1:";
        strcat(playerUrl, outport);
        struct dirent *next;
        while ((next = readdir(dir)) != NULL) {
            if (strcmp(next->d_name, "..") == 0)
                continue;
            if (!isdigit(*next->d_name))
                continue;
            char filename[64];
            snprintf(filename, sizeof(filename), "/proc/%s/cmdline",
                    next->d_name);
            FILE *status;
            if (!(status = fopen(filename, "r"))) {
                continue;
            }
            int n;
            char buffer[256];
            if ((n = fread(buffer, 1, sizeof(buffer), status)) == 0) {
                fclose(status);
                continue;
            }
            fclose(status);
            ///replace 0 with ' '
            while (char *ptr = (char *)memchr(buffer, 0, n - 1))
                *ptr = ' ';
            ///find process pid and kill
            if (strstr(buffer, playerUrl)) {
                kill(strtol(next->d_name, NULL, 0), SIGKILL);
            }
        }
        closedir(dir);
    }
}
Essaie d'ajouter à ce fichier la ligne « #include <string.h> » (juste après le bloc de commentaires de licences), puis relance la compilation.
Ok donc maintenant, j'ai le message d'erreur suivant :
make  all-recursive
make[1]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0 »
Making all in po
make[2]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/po »
make[2]: Rien à faire pour « all ».
make[2]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/po »
Making all in src
make[2]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/src »
g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I. -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -DGSOPCAST_LOCALEDIR=\""/usr/local/share/locale"\"    -g -O2 -MT fork.o -MD -MP -MF .deps/fork.Tpo -c -o fork.o fork.cc
fork.cc: In function 'void fork_sop(char*)':
fork.cc:125: attention : deprecated conversion from string constant to 'char*'
fork.cc:141: attention : deprecated conversion from string constant to 'char*'
mv -f .deps/fork.Tpo .deps/fork.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I. -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -DGSOPCAST_LOCALEDIR=\""/usr/local/share/locale"\"    -g -O2 -MT iorecord.o -MD -MP -MF .deps/iorecord.Tpo -c -o iorecord.o iorecord.cc
iorecord.cc: In function 'gboolean launch_record(void*)':
iorecord.cc:40: attention : deprecated conversion from string constant to 'char*'
iorecord.cc:44: erreur: 'strlen' was not declared in this scope
make[2]: *** [iorecord.o] Erreur 1
make[2]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0 »
make: *** [all] Erreur 2
Même manipulation, mais sur le fichier src/iorecord.cc cette fois.
J'ai maintenant le message suivant :
make  all-recursive
make[1]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0 »
Making all in po
make[2]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/po »
make[2]: Rien à faire pour « all ».
make[2]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/po »
Making all in src
make[2]: entrant dans le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/src »
g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I. -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -DGSOPCAST_LOCALEDIR=\""/usr/local/share/locale"\"    -g -O2 -MT iostatistics.o -MD -MP -MF .deps/iostatistics.Tpo -c -o iostatistics.o iostatistics.cc
iostatistics.cc: In function 'gboolean statistics_monitor(void*)':
iostatistics.cc:43: attention : deprecated conversion from string constant to 'char*'
iostatistics.cc:66: erreur: 'memset' was not declared in this scope
iostatistics.cc: In function 'void statistics_show(char*)':
iostatistics.cc:85: erreur: 'strtok_r' was not declared in this scope
iostatistics.cc: In function 'gboolean io_socket_statistics(GIOChannel*, GIOCondition, void*)':
iostatistics.cc:123: erreur: 'strstr' was not declared in this scope
iostatistics.cc:127: erreur: 'memset' was not declared in this scope
make[2]: *** [iostatistics.o] Erreur 1
make[2]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/Paul/Vidéos/gsopcast-0.4.0 »
make: *** [all] Erreur 2
Je suppose que je modifie le fichier iostatistics.cc ce coup la ?
Bien supposé 🙂. Tu le modifies comme les autres ^^.
J'ai continué les manipulations pour chaque fichier qui m'etait donné par la commande "make" et j'ai pu finir la compilation.

Merci beaucoup pour ta gentillesse et ta réactivité.

a+
@Gado

L'étape suivante est de créer un patch et de l'envoyer au développeur de ton application..