Opened 10 years ago

Closed 10 years ago

#41176 closed defect (duplicate)

snort 2.9.1.2_0 build failure under Mavericks

Reported by: Schamschula (Marius Schamschula) Owned by: markd@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: sck-nogas (Scott C. Kennedy), vincent.passaro@…, SickTeddyBear
Port: snort

Description

I get the following error when building snort under Mavericks:

/usr/bin/clang -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../src -I../../src/sfutil -I/sw/include -I../../src/output-plugins -I../../src/detection-plugins -I../../src/dynamic-plugins -I../../src/preprocessors -I../../src/preprocessors/portscan -I../../src/preprocessors/HttpInspect/include -I../../src/preprocessors/Stream5 -I../../src/target-based -I../../src/control  -I/opt/local/include -I/opt/local/include -DDYNAMIC_PLUGIN -I/opt/local/include -DZLIB -DGRE -DMPLS -DPREPROCESSOR_AND_DECODER_RULE_EVENTS -DPPM_MGR -DENABLE_PAF -DENABLE_REACT -DENABLE_RESPOND -DENABLE_RESPONSE3 -DSF_WCHAR -DSUP_IP6 -DTARGET_BASED -DPERF_PROFILING -DSNORT_RELOAD -DNORMALIZER -DACTIVE_RESPONSE  -pipe -Os -arch x86_64 -DSF_VISIBILITY -fvisibility=hidden -Wall -c spo_alert_test.c
In file included from spo_alert_syslog.c:70:
../../src/strlcatu.h:24:8: error: expected parameter declarator
size_t strlcat(char *, const char *, size_t);
       ^

main.log attached.

Attachments (7)

main.log (78.0 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
Portfile-snort.diff (2.2 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
main.2.log (75.5 KB) - added by vincent.passaro@… 10 years ago.
Main log file after snort fails to install
Portfile-snort.2.diff (2.2 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
main.3.log (494.1 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
Portfile-snort.3.diff (2.0 KB) - added by Schamschula (Marius Schamschula) 10 years ago.
Portfile-snort.4.diff (2.4 KB) - added by Schamschula (Marius Schamschula) 10 years ago.

Download all attachments as: .zip

Change History (19)

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: main.log added

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mavericks added
Owner: changed from macports-tickets@… to markd@…
Port: snort added

comment:2 Changed 10 years ago by sck-nogas (Scott C. Kennedy)

Cc: sck@… added

Cc Me!

comment:3 Changed 10 years ago by Schamschula (Marius Schamschula)

Apparently the size_t issue is a well known problem when using clang instead of gcc.

I added

configure.cc        ${prefix}/bin/gcc-mp-4.8

to get around the clang issue. A more general solution is required here. Portfile diff is attached.

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-snort.diff added

comment:4 in reply to:  description Changed 10 years ago by Schamschula (Marius Schamschula)

Also note snort 2.9.5.5 depends on daq 2.0.1, see ticket #41330

comment:5 Changed 10 years ago by vincent.passaro@…

Cc: vincent.passaro@… added

Cc Me!

Changed 10 years ago by vincent.passaro@…

Attachment: main.2.log added

Main log file after snort fails to install

comment:6 in reply to:  3 Changed 10 years ago by Schamschula (Marius Schamschula)

Replying to mschamschula@…:

Apparently the size_t issue is a well known problem when using clang instead of gcc.

I added

configure.cc        ${prefix}/bin/gcc-mp-4.8

to get around the clang issue. A more general solution is required here. Portfile diff is attached.

I tried building snort 2.9.5.6 using clang by adding

configure.cflags	-D_FORTIFY_SOURCE=0

instead of configure.cc

This ran into a different issue:

libtool: link: /usr/bin/clang -pipe -D_FORTIFY_SOURCE=0 -arch x86_64 -DSF_VISIBILITY -fvisibility=hidden -Wall -pipe -D_FORTIFY_SOURCE=0 -arch x86_64 -DSF_VISIBILITY -fvisibility=hidden -Wall -Wl,-headerpad_max_install_names -arch x86_64 -o u2spewfoo u2spewfoo-u2spewfoo.o  -L/opt/local/lib -ldaq_static -ldnet -lcrypto -lpcre -lm -ldl -ldaq_static_modules -lsfbpf -lpcap -lz -lpthread
Undefined symbols for architecture x86_64:
  "_free_iterator", referenced from:
      _u2dump in u2spewfoo-u2spewfoo.o
ld: symbol(s) not found for architecture x86_64

Portfile-snort.2.diff and main.3.log attached

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-snort.2.diff added

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: main.3.log added

comment:7 Changed 10 years ago by Schamschula (Marius Schamschula)

In the meantime snort has been updated to @2.9.6.0. Still using the same workarounds as for versions 2.9.5.x.

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-snort.3.diff added

comment:8 Changed 10 years ago by jul_bsd@…

same problem here. with latest Portfile patch build/install without problem

comment:9 Changed 10 years ago by SickTeddyBear

Cc: amcgee@… added

Cc Me!

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-snort.4.diff added

comment:10 Changed 10 years ago by Schamschula (Marius Schamschula)

Bumped the diff file (Portfile-snort.4.diff) to snort version 2.9.6.2. Also fixed master_sites and livecheck, as the URL for the download page has changed.

comment:11 Changed 10 years ago by Schamschula (Marius Schamschula)

The ticket is superseded by #42531. Please close!

comment:12 Changed 10 years ago by mf2k (Frank Schima)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.