View Issue Details

IDProjectCategoryView StatusLast Update
0005986SOGoSOPEpublic2024-09-18 10:45
ReporterArtim Assigned Toqhivert  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Platformamd64OSDebianOS Version12.5
Summary0005986: Failing to compile with error in SaxAttributeList.m
Description

For Bug # 5976 I'm trying to compile the latest SOPE and SOGo nightlies. I followed this guide: https://www.sogo.nu/support/faq/how-do-i-compile-sogo.html

the ./configure line does succeeds. This is its output:
GNUstep environment:
system:
local:
user:
path:
flat:
arch:
combo:

Configuration:
FHS: install in GNUstep tree
debug: yes
strip: no
prefix:
frameworks:
gstep: /usr/share/GNUstep/Makefiles
config: /opt/sope/config.make
script: /usr/share/GNUstep/Makefiles/GNUstep.sh

creating: /opt/sope/config.make
optional library found: xml2
optional library found: ldap
optional library found: ssl
optional library found: pq
failed to link optional library: mysqlclient
configuring NGStreams library .... done (log in config-NGStreams.log).

But "make" fails with these messages:
This is gnustep-make 2.9.1. Type 'make print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
Making all in sope-xml ...
Making all in SaxObjC ...
Making all for library libSaxObjC...
Compiling file SaxAttributeList.m ...
In file included from SaxAttributeList.m:22:
SaxAttributeList.h:25:9: fatal error: Foundation/NSObject.h: No such file or directory
25 | #import <Foundation/NSObject.h>
| ^~~~~~~
compilation terminated.
make[5]: [/usr/share/GNUstep/Makefiles/rules.make:521: obj/libSaxObjC.obj/SaxAttributeList.m.o] Error 1
make[4]:
[/usr/share/GNUstep/Makefiles/Instance/library.make:286: internal-library-all_] Error 2
make[3]: [/usr/share/GNUstep/Makefiles/Master/rules.make:297: libSaxObjC.all.library.variables] Error 2
make[2]:
[/usr/share/GNUstep/Makefiles/Master/library.make:37: internal-all] Error 2
make[1]: [/usr/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2
make:
[/usr/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2

Steps To Reproduce
  • clone sogo and sope git
  • cd into sope
  • ./configure --with-gnustep --enable-debug --disable-strip
  • make
Tagscompilation error, Debian

Activities

sebastien

sebastien

2024-06-26 06:57

administrator   ~0017762

Did you installed :

gnustep-make 
      gnustep-base-runtime 
      libgnustep-base-dev 

?

Artim

Artim

2024-06-26 08:56

reporter   ~0017763

libgnustep-base-dev was missing, thanks. Would it be possible to improve the guide for compilation to not just say "install GNUstep", but be more specific? Because I don't see any way to tell from the error messages that this package is missing.

Artim

Artim

2024-06-26 09:01

reporter   ~0017764

Also a more specific guide may be able to prevent the next issue I now face with compiling sogo. For make I get a very long output ending in

Compiling file MSExchangeFreeBusy.m ...
gcc -shared \
-Wl,--no-as-needed -lcurl -shared-libgcc -pthread -fexceptions -rdynamic -o Appointments.SOGo/./Appointments \
./obj/Appointments.obj/Product.m.o ./obj/Appointments.obj/NSArray+Appointments.m.o ./obj/Appointments.obj/iCalAlarm+SOGo.m.o ./obj/Appointments.obj/iCalCalendar+SOGo.m.o ./obj/Appointments.obj/iCalEntityObject+SOGo.m.o ./obj/Appointments.obj/iCalRepeatableEntityObject+SOGo.m.o ./obj/Appointments.obj/iCalEvent+SOGo.m.o ./obj/Appointments.obj/iCalEventChanges+SOGo.m.o ./obj/Appointments.obj/iCalPerson+SOGo.m.o ./obj/Appointments.obj/iCalToDo+SOGo.m.o ./obj/Appointments.obj/SOGoCalendarComponent.m.o ./obj/Appointments.obj/SOGoAppointmentObject.m.o ./obj/Appointments.obj/SOGoTaskObject.m.o ./obj/Appointments.obj/SOGoComponentOccurence.m.o ./obj/Appointments.obj/SOGoAppointmentOccurence.m.o ./obj/Appointments.obj/SOGoTaskOccurence.m.o ./obj/Appointments.obj/SOGoAppointmentFolder.m.o ./obj/Appointments.obj/SOGoAppointmentFolderICS.m.o ./obj/Appointments.obj/SOGoAppointmentFolderObject.m.o ./obj/Appointments.obj/SOGoAppointmentFolderXML.m.o ./obj/Appointments.obj/SOGoAppointmentInboxFolder.m.o ./obj/Appointments.obj/SOGoWebAppointmentFolder.m.o ./obj/Appointments.obj/SOGoAppointmentFolders.m.o ./obj/Appointments.obj/SOGoFreeBusyObject.m.o ./obj/Appointments.obj/SOGoUser+Appointments.m.o ./obj/Appointments.obj/SOGoUserFolder+Appointments.m.o ./obj/Appointments.obj/SOGoCalendarProxy.m.o ./obj/Appointments.obj/SOGoAptMailNotification.m.o ./obj/Appointments.obj/SOGoAptMailInvitation.m.o ./obj/Appointments.obj/SOGoAptMailDeletion.m.o ./obj/Appointments.obj/SOGoAptMailICalReply.m.o ./obj/Appointments.obj/SOGoAptMailUpdate.m.o ./obj/Appointments.obj/SOGoAptMailReceipt.m.o ./obj/Appointments.obj/SOGoAptMailReminder.m.o ./obj/Appointments.obj/SOGoEMailAlarmsManager.m.o ./obj/Appointments.obj/MSExchangeFreeBusySOAPRequest.m.o ./obj/Appointments.obj/MSExchangeFreeBusy.m.o \
-L../SOGo/SOGo.framework/Versions/Current/sogo/ -lSOGo -L../../SOGo/./obj/ -L../../SOPE/NGCards/./obj/ -lNGCards -L../../SOPE/GDLContentStore/./obj/ -lGDLContentStore -L/usr/local/lib -Wl,-rpath,/usr/lib/sogo -L../../SOPE/GDLContentStore/obj/ -L/root/GNUstep/Library/Libraries -L/usr/local/lib -L/usr/lib -lNGObjWeb -lNGMime -lNGStreams -lNGExtensions -lGDLAccess -lNGObjWeb -lNGMime -lNGLdap -lNGStreams -lNGExtensions -lEOControl -lDOM -lSaxObjC -lSBJson -lgnustep-base -lobjc -lm
/usr/bin/ld: cannot find -lSOGo: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: [/usr/share/GNUstep/Makefiles/wobundle.make:173: Appointments.SOGo/./Appointments] Error 1
make[2]:
[/usr/share/GNUstep/Makefiles/Master/rules.make:297: Appointments.all.wobundle.variables] Error 2
make[1]: [/usr/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2
make:
[/usr/share/GNUstep/Makefiles/Master/serial-subdirectories.make:53: internal-all] Error 2

Artim

Artim

2024-08-19 08:13

reporter   ~0017802

I'm currently trying to compile 5.11 which still fails with the same error. Something weird I found was the content of SoObjects/SOGo/SOGo.framework/Versions/Current/sogo/. It's a symlink called SOGo pointing at libSOGo.so, which doesn't exist:
ls -la SoObjects/SOGo/SOGo.framework/Versions/Current/sogo/
total 8,0K
drwxr-xr-x 2 root root 4,0K 19. Aug 10:07 .
drwxr-xr-x 5 root root 4,0K 19. Aug 10:07 ..
lrwxrwxrwx 1 root root 10 19. Aug 10:07 SOGo -> libSOGo.so

Is it possible that this is confusing gcc? ld is clearly trying to find some SOGo library that doesn't exist (yet). So what is tripping up its creation?

sebastien

sebastien

2024-08-19 09:19

administrator   ~0017805

Last edited: 2024-08-19 09:19

What is the debian version (still 12) ?
Can you try tu run ldconfig before compiling ?

Artim

Artim

2024-08-19 09:22

reporter   ~0017806

Yes, still stable. Running ldconfig has no output and no change in the result.

PS: the same error message has just been posted to the SOGo mailing list.

sebastien

sebastien

2024-08-20 13:17

administrator   ~0017815

Do you have a dockerfile with your environment to provide ?

Artim

Artim

2024-08-20 14:01

reporter   ~0017818

I don't compile inside a docker environment.

giopan

giopan

2024-08-27 15:22

reporter   ~0017832

Hi,
I'm having the exact same issue. I'm attaching the Dockerfile I'm using

Dockerfile (684 bytes)   
FROM ubuntu:latest

RUN apt-get update
RUN apt-get install -y git make gnustep gnustep-make gnustep-devel gnustep-base-runtime libgnustep-base-dev libxml2-dev libmemcached-dev libssl-dev libldap-dev libldap2-dev libpq-dev libz-dev libsodium-dev pkg-config libzip-dev libcurl4-openssl-dev

WORKDIR /tmp
RUN git clone --depth 1 --branch SOPE-5.11.0 https://github.com/Alinto/sope SOPE
WORKDIR /tmp/SOPE
RUN ./configure --with-gnustep --enable-debug --disable-strip
RUN make
RUN make install

RUN ldconfig

WORKDIR /tmp
RUN git clone --depth 1 --branch SOGo-5.11.0 https://github.com/Alinto/SOGo
WORKDIR /tmp/SOGo
RUN ./configure --enable-debug --disable-strip
RUN make
RUN make install
Dockerfile (684 bytes)   
qhivert

qhivert

2024-08-27 17:11

administrator   ~0017834

Hello,
So from the dockerfile of @giopan (thanks btw!) I have the same error. But moment before the -lSOGo error, there is another one

 Linking framework SOGo ...
/usr/bin/ld: cannot find -lytnef: No such file or directory
collect2: error: ld returned 1 exit status

After installing it (on rhel/centos the package is called libytnef-devel )

apt install libytnef0-dev

the build works.

Could you all try it ? For now I don't quite understand if this is normal or a regression and why the build doesn't stop directly there

sebastien

sebastien

2024-08-27 19:20

administrator   ~0017836

You need to add libytnef0-dev

Sebastien

giopan

giopan

2024-08-28 05:45

reporter   ~0017841

Whoops, I didn't see the ytnef error. Thanks ;)

Artim

Artim

2024-08-28 08:38

reporter   ~0017842

Installing libytnef0-dev seems to have solved this for me too.

So again, could you please have someone put a full list of required dependencies into the compilation guide, or at least give a guide on how to figure out what's missing? Because I did not see any "cannot find -lytnef" in that wall of text.

Artim

Artim

2024-09-18 10:45

reporter   ~0017892

It seems while compilation went through without any issues I could see, executing the new sogod binary (by changing the existing systemd service file to point to /usr/local/sbin/sogod instead of /usr/sbin/sogod, whith everything else left the same) results in this error message:

/usr/local/sbin/sogod: symbol lookup error: /usr/local/sbin/sogod: undefined symbol: SOGoBuildDate

followed by a message from systemd:

sogo.service: Control process exited, code=exited, status=127/n/a

Attached is the part of the sogo log refering to the same time stamp. Parts of it seem to be cut off.

PS: this is the content of the systemd service file, if that's of any help:
[Unit]
Description=SOGo is a groupware server
Documentation=https://sogo.nu/files/docs/SOGoInstallationGuide.html
After=network.target
After=postgresql.service
After=mariadb.service
After=mysql.service

[Service]
Environment="PREFORK=3"
EnvironmentFile=-/etc/default/sogo
Type=forking
ExecStart=/usr/sbin/sogod -WOWorkersCount ${PREFORK} -WOPidFile /run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log
#ExecStart=/usr/local/sbin/sogod -WOWorkersCount ${PREFORK} -WOPidFile /run/sogo/sogo.pid -WOLogFile /var/log/sogo/sogo.log #including both lines for quicker switching
RuntimeDirectory=sogo
PIDFile=/run/sogo/sogo.pid
User=sogo

[Install]
WantedBy=multi-user.target

Question is, if switching to the self-compiled sogod binary, is the correct RuntimeDirectory used?

sogo-log.txt (4,153 bytes)   
Sep 18 12:32:41 sogod [5135]: <0x0x55a56d9938a0[WOWatchDog]> Terminating with SIGINT or SIGTERM
                        ^
<data>:55: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
<data>:57: element a: validity error : ID LPNoLP already defined
<a href="https://domain.tld/ew" class="OWAAutoLink" id="LPNoLP">https://rwth
                                                                   ^
<data>:59: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
<data>:62: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
QL4 connection dropped 0x0x55a572468c70 (channel=0x0x55a572464530)
                                     ^
<data>:59: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
<data>:62: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
MySQL4 connection dropped 0x0x55a571805070 (channel=0x0x55a571222360)
MySQL4 connection dropped 0x0x55a571b3c5f0 (channel=0x0x55a57193e5e0)
<data>:19: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
<data>:51: element a: validity error : ID LPNoLP already defined
family:&quot;Courier New&quot;,serif,EmojiFont; font-size:13.3333px" id="LPNoLP"
                                                                               ^
<data>:55: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
<data>:57: element a: validity error : ID LPNoLP already defined
<a href="https://domain.tld/ew" class="OWAAutoLink" id="LPNoLP">https://domain
                                                                   ^
<data>:59: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
<data>:62: element div: validity error : ID divtagdefaultwrapper already defined
lorEmoji, &quot;Segoe UI Symbol&quot;, &quot;Android Emoji&quot;, EmojiSymbols;"
                                                                               ^
2024-09-18 12:32:42.213 sogod[5135:5135] INFO(-[NGActiveSocket isAlive]) poll(): fd=9 revents=0x0011)
Sep 18 12:32:42 sogod [5135]: <0x0x55a56d9938a0[WOWatchDog]> Terminating with SIGINT or SIGTERM
Sep 18 12:32:42 sogod [5135]: <0x0x55a56da90a80[WOWatchDogChild]> child 5137 exited
2024-09-18 12:32:42.233 sogod[5135:5135] INFO(-[NGActiveSocket isAlive]) poll(): fd=7 revents=0x0011)
Sep 18 12:32:42 sogod [5135]: <0x0x55a56d9938a0[WOWatchDog]> Terminating with SIGINT or SIGTERM
2024-09-18 12:32:42.234 sogod[5135:5135] INFO(-[NGActiveSocket isAlive]) poll(): fd=11 revents=0x0011)
Sep 18 12:32:42 sogod [5135]: <0x0x55a56d9938a0[WOWatchDog]> Terminating with SIGINT or SIGTERM
Sep 18 12:32:42 sogod [5135]: <0x0x55a56db10540[WOWatchDogChild]> child 5136 exited
Sep 18 12:32:42 sogod [5135]: <0x0x55a56da90920[WOWatchDogChild]> child 5138 exited
Sep 18 12:32:42 sogod [5135]: <0x0x55a56d9938a0[WOWatchDog]> all children exited. We now terminate.
sogo-log.txt (4,153 bytes)   

Issue History

Date Modified Username Field Change
2024-06-25 12:36 Artim New Issue
2024-06-25 12:36 Artim Tag Attached: compilation error
2024-06-25 12:36 Artim Tag Attached: Debian
2024-06-26 06:57 sebastien Note Added: 0017762
2024-06-26 08:56 Artim Note Added: 0017763
2024-06-26 09:01 Artim Note Added: 0017764
2024-08-19 08:13 Artim Note Added: 0017802
2024-08-19 09:19 sebastien Note Added: 0017805
2024-08-19 09:19 sebastien Note Edited: 0017805
2024-08-19 09:22 Artim Note Added: 0017806
2024-08-20 13:17 sebastien Note Added: 0017815
2024-08-20 14:01 Artim Note Added: 0017818
2024-08-27 15:22 giopan Note Added: 0017832
2024-08-27 15:22 giopan File Added: Dockerfile
2024-08-27 17:11 qhivert Note Added: 0017834
2024-08-27 17:12 qhivert Assigned To => qhivert
2024-08-27 17:12 qhivert Status new => feedback
2024-08-27 19:20 sebastien Note Added: 0017836
2024-08-28 05:45 giopan Note Added: 0017841
2024-08-28 08:38 Artim Note Added: 0017842
2024-08-28 08:38 Artim Status feedback => assigned
2024-09-18 10:45 Artim Note Added: 0017892
2024-09-18 10:45 Artim File Added: sogo-log.txt