Re: Need some help with c++/qt5 code

2016-04-14 Thread Shane Ambler

On 15/04/2016 08:02, Dimitry Andric wrote:

On 14 Apr 2016, at 13:58, Shane Ambler  wrote:


Hi there, while I am comfortable with c and python, I only know a little
c++ and could use some help.

...

class TPanelFactory
{
QString m_panelType;
static QMap m_table;

public:
TPanelFactory(QString panelType);
~TPanelFactory();

QString getPanelType() const { return m_panelType; }

virtual void initialize(TPanel *panel) = 0;
virtual TPanel *createPanel(QWidget *parent);
static TPanel *createPanel(QWidget *parent, QString panelType);
};

m_table is then in the source file as

QMap TPanelFactory::m_table;

The segfault happens in the constructor -

TPanelFactory::TPanelFactory(QString panelType)
: m_panelType(panelType)
{
assert(m_table.count(panelType) == 0);
m_table[m_panelType] = this;
}

the last line causes the segfault, if I comment it out then main() is
entered, but I expect removing that line will bite back soon enough.

How can I get this working?

Why would this fail on FreeBSD but not OSX or windows?


Most likely the program depends on the initialization order of global
constructors.  This is bad practice, and should be avoided.




So what's the value of m_table at this point?  It looks a lot like it
is still uninitialized.


Yes uninitialised sounds right - what is the right way to fix this?

I get non-zero values for the address of each variable there, but while
they may be allocated I don't think they are initialised as a call to
m_table.count() will cause a segfault.

TPanelFactory::TPanelFactory(QString panelType)
: m_panelType(panelType)
{
assert(m_table.count(panelType) == 0);
std::cout << "m_table.count is " << m_table.count(panelType) << 
std::endl;
std::cout << "TPanelFactory::m_table is at " << 
::m_table << std::endl;

std::cout << "this is at " << this << std::endl;
std::cout << "panelType is at " <<  << std::endl;
std::cout << "m_panelType is at " << _panelType << std::endl;
m_table[m_panelType] = this;
}

The output with m_table.count() prevents the other output lines
running, without the m_table.count() line, the others can output
before the segfault.

Without the m_table.count() line -
% ./opentoonz
TPanelFactory::m_table is at 0xc39568
this is at 0xc3a628
panelType is at 0x7fffd408
m_panelType is at 0xc3a630
Segmentation fault

With the m_table.count() line -
% lldb opentoonz
Current executable set to 'opentoonz' (x86_64).
(lldb) run
Process 56499 launching
Process 56499 stopped
(lldb) Process 56499 launched: 
'/home/shane/Projects/opentoonz/test_install/bin/opentoonz' (x86_64)

Process 56499 stopped
* (lldb) thread #1: tid = 101441, 0x004f2d7f 
opentoonz`QMapData::nodeRange(QString const&, 
QMapNode**, QMapNode**) + 31, stop reason = invalid address (fault address: 0x10)
frame #0: 0x004f2d7f opentoonz`QMapData::nodeRange(QString const&, QMapNode**, QMapNode**) + 31
opentoonz`QMapData::nodeRange(QString const&, 
QMapNode**, QMapNode**) + 31:

-> 0x4f2d7f:  movq   0x10(%r14), %r15
   0x4f2d83:  addq   $0x8, %r14
   0x4f2d87:  testq  %r15, %r15
   0x4f2d8a:  je 0x4f2e6a  ; QMapData::nodeRange(QString const&, QMapNode**, QMapNode**) + 266

(lldb) bt
* thread #1: tid = 101441, 0x004f2d7f 
opentoonz`QMapData::nodeRange(QString const&, 
QMapNode**, QMapNode**) + 31, stop reason = invalid address (fault address: 0x10)
  * frame #0: 0x004f2d7f opentoonz`QMapData::nodeRange(QString const&, QMapNode**, QMapNode**) + 31
frame #1: 0x004f20d8 
opentoonz`TPanelFactory::TPanelFactory(QString) + 120
frame #2: 0x0057118d 
opentoonz`XsheetViewerFactory::XsheetViewerFactory() + 45

frame #3: 0x005701d7 opentoonz`_GLOBAL__I_a + 1687
frame #4: 0x0080a1b2 opentoonz`__do_global_ctors_aux + 34
frame #5: 0x0048551e opentoonz`_init + 14
frame #6: 0x000800c03c9f
frame #7: 0x000800c0328e
(lldb) quit


--
FreeBSD - the place to B...Software Developing

Shane Ambler

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Email lists

2016-04-14 Thread Michelle Sullivan

Dave Horsfall wrote:

On Thu, 14 Apr 2016, Matthias Apitz wrote:


I'm looking to create an email campaign with a nice newsletter or
email I really don't want to spam. ...

Any email you send to someone who has not given you the email addr for
such campaign and has not agreed in receive such mails, is per
definition to be considered as SPAM.

And as a result, you will be listed by at least half a dozen sites, and
will thereby be unable to deliver any email at all.  Think of it as
evolution in action...

Did I mention that it's really hard to remove yourself from a anti-spam
list?


No comment :P

--
Michelle Sullivan
http://www.mhix.org/

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Need some help with c++/qt5 code

2016-04-14 Thread Dimitry Andric
On 14 Apr 2016, at 13:58, Shane Ambler  wrote:
> 
> Hi there, while I am comfortable with c and python, I only know a little
> c++ and could use some help.
...
> class TPanelFactory
> {
>QString m_panelType;
>static QMap m_table;
> 
> public:
>TPanelFactory(QString panelType);
>~TPanelFactory();
> 
>QString getPanelType() const { return m_panelType; }
> 
>virtual void initialize(TPanel *panel) = 0;
>virtual TPanel *createPanel(QWidget *parent);
>static TPanel *createPanel(QWidget *parent, QString panelType);
> };
> 
> m_table is then in the source file as
> 
> QMap TPanelFactory::m_table;
> 
> The segfault happens in the constructor -
> 
> TPanelFactory::TPanelFactory(QString panelType)
>: m_panelType(panelType)
> {
>assert(m_table.count(panelType) == 0);
>m_table[m_panelType] = this;
> }
> 
> the last line causes the segfault, if I comment it out then main() is
> entered, but I expect removing that line will bite back soon enough.
> 
> How can I get this working?
> 
> Why would this fail on FreeBSD but not OSX or windows?

Most likely the program depends on the initialization order of global
constructors.  This is bad practice, and should be avoided.


> The backtrace I get from lldb and gdb -
> 
> % lldb opentoonz
> Current executable set to 'opentoonz' (x86_64).
> (lldb) run
> Process 80086 launching
> Process 80086 stopped
> (lldb) Process 80086 launched: 
> '/home/shane/Projects/opentoonz/test_install/bin/opentoonz' (x86_64)
> Process 80086 stopped
> * (lldb) thread #1: tid = 101033, 0x004f2026 
> opentoonz`TPanelFactory::TPanelFactory(QString) + 70, stop reason = invalid 
> address (fault address: 0x0)
>frame #0: 0x004f2026 
> opentoonz`TPanelFactory::TPanelFactory(QString) + 70
> opentoonz`TPanelFactory::TPanelFactory(QString) + 70:
> -> 0x4f2026:  cmpl   $0x2, (%rax)
>   0x4f2029:  jb 0x4f203d  ; 
> TPanelFactory::TPanelFactory(QString) + 93
>   0x4f202b:  movq   0x73eb5e(%rip), %r15  ; opentoonz..got + 6728
>   0x4f2032:  movq   %r15, %rdi
> (lldb) bt
> * thread #1: tid = 101033, 0x004f2026 
> opentoonz`TPanelFactory::TPanelFactory(QString) + 70, stop reason = invalid 
> address (fault address: 0x0)
>  * frame #0: 0x004f2026 
> opentoonz`TPanelFactory::TPanelFactory(QString) + 70
>frame #1: 0x00570cfd 
> opentoonz`XsheetViewerFactory::XsheetViewerFactory() + 45
>frame #2: 0x0056fd47 opentoonz`_GLOBAL__I_a + 1687
>frame #3: 0x00809d22 opentoonz`__do_global_ctors_aux + 34
>frame #4: 0x004854ae opentoonz`_init + 14
>frame #5: 0x000800c02c9f
>frame #6: 0x000800c0228e

So what's the value of m_table at this point?  It looks a lot like it
is still uninitialized.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Compiling binutils-2.25.1 failed

2016-04-14 Thread Dimitry Andric
On 14 Apr 2016, at 14:10, Willem Offermans  wrote:
> 
> I have inherited an ``old'' FreeBSD server. I like to bring it up to date.
> However I have problems to compile binutils-2.25.1.
...
> In file included from ./cp-demangle.c:128:
> ./../include/libiberty.h:113:38: error: expected function body after
> function declarator
> extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL
> ATTRIBUTE_NONNULL(1);
>^

In binutils' include/ansidecl.h header, there is this code fragment:

/* Attribute `returns_nonnull' was valid as of gcc 4.9.  */
#ifndef ATTRIBUTE_RETURNS_NONNULL
# if (GCC_VERSION >= 4009)
#  define ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
# else
#  define ATTRIBUTE_RETURNS_NONNULL
# endif /* GNUC >= 4.9 */
#endif /* ATTRIBUTE_RETURNS_NONNULL */

For some reason this doesn't seem to be picked up by your ports build.
For example, it is possible that your build picks up an ansidecl.h from
somewhere else, so search your system for duplicate copies of this
header.

Also, can you preprocess the file with -E, or use -save-temps to save
the intermediate result?  Then you should be able to see what the macro
expands to, if anything.

-Dimitry



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Email lists

2016-04-14 Thread Dave Horsfall
On Thu, 14 Apr 2016, Matthias Apitz wrote:

> > I'm looking to create an email campaign with a nice newsletter or 
> > email I really don't want to spam. ...
> 
> Any email you send to someone who has not given you the email addr for 
> such campaign and has not agreed in receive such mails, is per 
> definition to be considered as SPAM.

And as a result, you will be listed by at least half a dozen sites, and 
will thereby be unable to deliver any email at all.  Think of it as 
evolution in action...

Did I mention that it's really hard to remove yourself from a anti-spam 
list?

Get permission from your subscribers...

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Email lists

2016-04-14 Thread Alphons van Werven
Matthias Apitz wrote:

>> I'm looking to create an email campaign with a nice newsletter or email
>> I really don't want to spam. ...
> 
> Any email you send to someone who has not given you the email addr for
> such campaign and has not agreed in receive such mails, is per definition
> to be considered as SPAM.

In fact, the software mentioned in the link appears to quite simply be a
harvester. The OP's intentions notwithstanding, it's a spamming tool any
way one looks at it.

Fonz

-- 
A.J. "Fonz" van Werven
mailsig: Ob technicas difficultates, lux in fine cuniculum non operatur.


signature.asc
Description: PGP signature


Re: RT 4.4.x request

2016-04-14 Thread Kurt Jaeger
Hi!

> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208229
> 
> and I'm working on getting it into the tree soonish.

Btw, if you could download that version, run-test it and give us
feedback if it works for you ? I'm afraid I have not the time
to run-test it myself.

-- 
p...@opsec.eu+49 171 3101372 4 years to go !
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


OpenNMS 1.1x request....

2016-04-14 Thread pathiaki2 via freebsd-ports

Hi,

Could someone please help me get traction with the OpenJDK people so I 
can do this port?  It's been submitted multiple times but I never hear 
back.  I have managed to even write up a web page on the OpenNMS page.  
Problem is the thing crashed on OpenJDK 8 and 9 on FreeBSD.  It does not 
crash on OpenJDK or Oracle JDK on Linux.


http://www.opennms.org/wiki/Installing_on_FreeBSD_10.x_with_OpenJDK

This is going on over 2 years.  The OpenNMS people have created patches 
to fix any of their errors.  However, OpenJDK does not respond with any 
help.  Could someone in ports look into this and get some traction?


Right now, the app runs for about 1-24 hours and then Java cores.

It's been on 10.0, 10.1, 10.2 and even 10.3... Same error.

Thank you,

Paul Pathiakis
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


RT 4.4.x request

2016-04-14 Thread pathiaki2 via freebsd-ports

Hi Matt,

Request Tracker is out of date.  The latest version is 4.4.2...  The 
latest I find in pkgs/ports is 4.2.12.


Thank you!!

P.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: 'porting' AMD compiler suite

2016-04-14 Thread Jung-uk Kim
On 04/14/16 02:48 AM, Andriy Gapon wrote:
> On 14/04/2016 05:38, William A. Mahaffey III wrote:
>> All seems OK w/ the system headers (I know, shocking ), the required 
>> files
>> defining a '__uintptr_t' are in fact unconditionally included, so it must be
>> something else (bad defines somewhere, or ). I am still chasing 
> 
> Apologies, but are you serious?..
> 
> $ fgrep -r __uintptr_t /usr/include/
> ...
> /usr/include/x86/_types.h:typedef   __uint64_t  __uintptr_t;
> /usr/include/x86/_types.h:typedef   __uint32_t  __uintptr_t;
> ...
> 
> This is on an amd64 head system.

#ifdef  __LP64__
...
typedef __uint64_t  __uintptr_t;
#else
...
typedef __uint32_t  __uintptr_t;
#endif

Jung-uk Kim



signature.asc
Description: OpenPGP digital signature


Re: Email lists

2016-04-14 Thread Matthias Apitz
El jueves, 14 de abril de 2016 17:27:34 (CEST), Jonathan Moore 
 escribió:

Hi,

I'm looking to create an email campaign with a nice newsletter or email
I really don't want to spam. ...


Any email you send to someone who has not given you the email addr for such 
campaign and has not agreed in receive such mails, is per definition to be 
considered as SPAM.


matthias




--
Sent from my Ubuntu mobile device
http://www.unixarea.de/
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Email lists

2016-04-14 Thread Jonathan Moore
Hi,

I'm looking to create an email campaign with a nice newsletter or email
I really don't want to spam. I' want to use SurgarCRM  I found this for
Windows
-> https://www.atompark.com/web-email-extractor/free-email-lists/

Is there something similar in the ports?

Thanks,

Jonathan Moore
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Compiling binutils-2.25.1 failed

2016-04-14 Thread Michelle Sullivan

Willem Offermans wrote:

Dear FreeBSD friends,

I have inherited an ``old'' FreeBSD server. I like to bring it up to date.
However I have problems to compile binutils-2.25.1.

config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
gmake[4]: Entering directory
.

.
.


Can someone give me a hint to solve this issue?


Not a very helpful answer... but the way the ports tree and OS has been 
pushed into breakage on older systems, the only solution now seems to be 
'try and find a precompiled package' otherwise, freebsd-update to the 
latest and then update the ports or erase and start again... Sorry for 
your pain.


--
Michelle Sullivan
http://www.mhix.org/

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: FreeBSD Port: tcc-0.9.26_3

2016-04-14 Thread Carlos J Puga Medina
On Thu, 2016-04-14 at 10:58 +0200, Ben Wiederhake wrote:

Hi,
> Hello,
> 
> > 
> > > 
> > > "#include " seems to be impossible with tcc on FreeBSD.
> > > 
> > > Steps to reproduce:
> > > Try to compile the following program:
> > > """
> > > #include 
> > > #include 
> > > int main(void){printf("Hello world\n");}
> > > """
> > > 
> > > Excepted results:
> > > Compilation finishes with no errors.
> > > 
> > > Actual results:
> > > """
> > > In file included from foo.c:1:
> > > In file included from /usr/include/stdint.h:33:
> > > In file included from /usr/include/sys/_types.h:33:
> > > In file included from /usr/include/machine/_types.h:6:
> > > /usr/include/x86/_types.h:161: error: too many basic types
> > > """
> > > And compilation fails.
> > You want to be using the headers provided with tcc?
> > 
> > # tcc -run -I/usr/local/lib/tcc/include test.c
> > Hello world
> Doesn't work either; it fails with the exact same error in the exact 
> same spot.
> 
> Maybe that's because:
> - tcc's 'include' are already on the search path by default (see 'man
> tcc')
> - there's no 'stdio.h' nor 'stdint.h' among tcc's provided headers.
> 
> Again: on Debian, it works, and the provided headers are the same
> files 
> (slightly different content, but that shouldn't matter).
> 
> Does it work on your machine?  If so, what could I have done wrong?
> 

Probably, you want to check out the following PRs to know how we try to
fix tcc in due course. So, tcc should compile but linking is broken.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202093
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201749

I'll take a look closely ASAP.

Thanks for reporting!
-- 
Carlos Jacobo Puga Medina 
PGP fingerprint = C60E 9497 5302 793B CC2D  BB89 A1F3 5D66 E6D0 5453


signature.asc
Description: This is a digitally signed message part


Compiling binutils-2.25.1 failed

2016-04-14 Thread Willem Offermans
Dear FreeBSD friends,

I have inherited an ``old'' FreeBSD server. I like to bring it up to date.  
However I have problems to compile binutils-2.25.1.

config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
gmake[4]: Entering directory 
'/usr/ports/devel/binutils/work/binutils-2.25.1/libiberty'
if [ x"" != x ] && [ ! -d pic ]; then \
  mkdir pic; \
else true; fi
touch stamp-picdir
if [ x"" != x ] && [ ! -d noasan ]; then \
  mkdir noasan; \
else true; fi
touch stamp-noasandir
if [ x"" != x ]; then \
  cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic   ./regex.c -o pic/regex.o; \
else true; fi
if [ x"" != x ]; then \
  cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic./regex.c -o noasan/regex.o; 
\
else true; fi
cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic  ./regex.c -o regex.o
if [ x"" != x ]; then \
  cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic   ./cplus-dem.c -o 
pic/cplus-dem.o; \
else true; fi
if [ x"" != x ]; then \
  cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic./cplus-dem.c -o 
noasan/cplus-dem.o; \
else true; fi
cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic  ./cplus-dem.c -o cplus-dem.o
if [ x"" != x ]; then \
  cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic   ./cp-demangle.c -o 
pic/cp-demangle.o; \
else true; fi
if [ x"" != x ]; then \
  cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic./cp-demangle.c -o 
noasan/cp-demangle.o; \
else true; fi
cc -c -DHAVE_CONFIG_H -O2 -pipe  -I/usr/local/include -fstack-protector 
-fno-strict-aliasing  -I. -I./../include  -W -Wall -Wwrite-strings 
-Wc++-compat -Wstrict-prototypes -pedantic  ./cp-demangle.c -o 
cp-demangle.o
In file included from ./cp-demangle.c:128:
./../include/libiberty.h:113:38: error: expected function body after 
function declarator
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL 
ATTRIBUTE_NONNULL(1);
 ^
./../include/libiberty.h:124:45: error: expected function body after 
function declarator
extern const char *lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL 
ATTRIBUTE_NONNULL(1);
^
./../include/libiberty.h:129:49: error: expected function body after 
function declarator
extern const char *dos_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL 
ATTRIBUTE_NONNULL(1);
^
./../include/libiberty.h:135:50: error: expected function body after 
function declarator
extern const char *unix_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL 
ATTRIBUTE_NONNULL(1);

 ^
./../include/libiberty.h:145:58: error: expected function body after 
function declarator
extern char *concat (const char *, ...) ATTRIBUTE_MALLOC 
ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
 ^
./../include/libiberty.h:154:68: error: expected function body after 
function declarator
extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC 
ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_SENTINEL;
   ^
./../include/libiberty.h:167:54: error: expected function body after 
function declarator
extern char *concat_copy (char *, const char *, ...) 
ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1) ATTRIBUTE_SENTINEL;
 ^
./../include/libiberty.h:174:47: error: expected function body after 
function declarator
extern char *concat_copy2 (const char *, ...) ATTRIBUTE_RETURNS_NONNULL 
ATTRIBUTE_SENTINEL;
  ^
./../include/libiberty.h:232:55: error: expected function body after 
function declarator
extern char *choose_temp_base (void) ATTRIBUTE_MALLOC 
ATTRIBUTE_RETURNS_NONNULL;
  ^

Need some help with c++/qt5 code

2016-04-14 Thread Shane Ambler

Hi there, while I am comfortable with c and python, I only know a little
c++ and could use some help.

I am in the process of getting a QT5 based app running on FreeBSD and
have an issue that I'm not sure how to resolve. The project is opentoonz
which is a commercial project that was recently open sourced. The code
base has been previously built only on OSX and windows

By using work others have done to build on linux I have got to the point
of compiling and linking on FreeBSD but get a segfault on startup. The
failing code is part of the variable initialising run before the first
line of main()

I am using clang 3.4.1 on 10-STABLE-amd64, (gcc build needs more work)
the binary is linked to gcc48/libgcc_s.so which is needed for the
superlu/blas libraries that are used.

The class definition is -

class TPanelFactory
{
QString m_panelType;
static QMap m_table;

public:
TPanelFactory(QString panelType);
~TPanelFactory();

QString getPanelType() const { return m_panelType; }

virtual void initialize(TPanel *panel) = 0;
virtual TPanel *createPanel(QWidget *parent);
static TPanel *createPanel(QWidget *parent, QString panelType);
};

m_table is then in the source file as

QMap TPanelFactory::m_table;

The segfault happens in the constructor -

TPanelFactory::TPanelFactory(QString panelType)
: m_panelType(panelType)
{
assert(m_table.count(panelType) == 0);
m_table[m_panelType] = this;
}

the last line causes the segfault, if I comment it out then main() is
entered, but I expect removing that line will bite back soon enough.

How can I get this working?

Why would this fail on FreeBSD but not OSX or windows?

The backtrace I get from lldb and gdb -

% lldb opentoonz
Current executable set to 'opentoonz' (x86_64).
(lldb) run
Process 80086 launching
Process 80086 stopped
(lldb) Process 80086 launched: 
'/home/shane/Projects/opentoonz/test_install/bin/opentoonz' (x86_64)

Process 80086 stopped
* (lldb) thread #1: tid = 101033, 0x004f2026 
opentoonz`TPanelFactory::TPanelFactory(QString) + 70, stop reason = 
invalid address (fault address: 0x0)
frame #0: 0x004f2026 
opentoonz`TPanelFactory::TPanelFactory(QString) + 70

opentoonz`TPanelFactory::TPanelFactory(QString) + 70:
-> 0x4f2026:  cmpl   $0x2, (%rax)
   0x4f2029:  jb 0x4f203d  ; 
TPanelFactory::TPanelFactory(QString) + 93

   0x4f202b:  movq   0x73eb5e(%rip), %r15  ; opentoonz..got + 6728
   0x4f2032:  movq   %r15, %rdi
(lldb) bt
* thread #1: tid = 101033, 0x004f2026 
opentoonz`TPanelFactory::TPanelFactory(QString) + 70, stop reason = 
invalid address (fault address: 0x0)
  * frame #0: 0x004f2026 
opentoonz`TPanelFactory::TPanelFactory(QString) + 70
frame #1: 0x00570cfd 
opentoonz`XsheetViewerFactory::XsheetViewerFactory() + 45

frame #2: 0x0056fd47 opentoonz`_GLOBAL__I_a + 1687
frame #3: 0x00809d22 opentoonz`__do_global_ctors_aux + 34
frame #4: 0x004854ae opentoonz`_init + 14
frame #5: 0x000800c02c9f
frame #6: 0x000800c0228e
(lldb) quit


% gdb opentoonz
...
(gdb) run
Starting program: /home/shane/Projects/opentoonz/test_install/bin/opentoonz

Program received signal SIGSEGV, Segmentation fault.
0x004f2026 in TPanelFactory::TPanelFactory(QString) ()
(gdb) bt
#0  0x004f2026 in TPanelFactory::TPanelFactory(QString) ()
#1  0x00570cfd in XsheetViewerFactory::XsheetViewerFactory() ()
#2  0x0056fd47 in global constructors keyed to a ()
#3  0x00809d22 in __do_global_ctors_aux ()
#4  0x004854ae in _init ()
#5  0x7fffda20 in ?? ()
#6  0x000800c02c9f in objlist_call_init () from /libexec/ld-elf.so.1
#7  0x000800c0228e in _rtld () from /libexec/ld-elf.so.1
#8  0x000800c00449 in .rtld_start () from /libexec/ld-elf.so.1
#9  0x in ?? ()
(gdb) quit


--
FreeBSD - the place to B...Software Developing

Shane Ambler

___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


FreeBSD ports you maintain which are out of date

2016-04-14 Thread portscout
Dear port maintainer,

The portscout new distfile checker has detected that one or more of your
ports appears to be out of date. Please take the opportunity to check
each of the ports listed below, and if possible and appropriate,
submit/commit an update. If any ports have already been updated, you can
safely ignore the entry.

You will not be e-mailed again for any of the port/version combinations
below.

Full details can be found at the following URL:
http://portscout.freebsd.org/po...@freebsd.org.html


Port| Current version | New version
+-+
devel/py-jep| 3.5.0   | 3.5.2
+-+


If any of the above results are invalid, please check the following page
for details on how to improve portscout's detection and selection of
distfiles on a per-port basis:

http://portscout.freebsd.org/info/portscout-portconfig.txt

Thanks.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: FreeBSD Port: tcc-0.9.26_3

2016-04-14 Thread Ben Wiederhake

Hello,


"#include " seems to be impossible with tcc on FreeBSD.

Steps to reproduce:
Try to compile the following program:
"""
#include 
#include 
int main(void){printf("Hello world\n");}
"""

Excepted results:
Compilation finishes with no errors.

Actual results:
"""
In file included from foo.c:1:
In file included from /usr/include/stdint.h:33:
In file included from /usr/include/sys/_types.h:33:
In file included from /usr/include/machine/_types.h:6:
/usr/include/x86/_types.h:161: error: too many basic types
"""
And compilation fails.

You want to be using the headers provided with tcc?

# tcc -run -I/usr/local/lib/tcc/include test.c
Hello world


Doesn't work either; it fails with the exact same error in the exact 
same spot.


Maybe that's because:
- tcc's 'include' are already on the search path by default (see 'man tcc')
- there's no 'stdio.h' nor 'stdint.h' among tcc's provided headers.

Again: on Debian, it works, and the provided headers are the same files 
(slightly different content, but that shouldn't matter).


Does it work on your machine?  If so, what could I have done wrong?

Regards,
Ben Wiederhake
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: 'porting' AMD compiler suite

2016-04-14 Thread Andriy Gapon
On 14/04/2016 05:38, William A. Mahaffey III wrote:
> All seems OK w/ the system headers (I know, shocking ), the required files
> defining a '__uintptr_t' are in fact unconditionally included, so it must be
> something else (bad defines somewhere, or ). I am still chasing 

Apologies, but are you serious?..

$ fgrep -r __uintptr_t /usr/include/
...
/usr/include/x86/_types.h:typedef   __uint64_t  __uintptr_t;
/usr/include/x86/_types.h:typedef   __uint32_t  __uintptr_t;
...

This is on an amd64 head system.

-- 
Andriy Gapon
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"